Messages in this thread | | | Date | Thu, 19 Sep 2013 02:39:05 +0900 | From | Hitoshi Mitake <> | Subject | Re: [PATCH 3/7] perf lock: plug some memleaks |
| |
At Mon, 9 Sep 2013 08:31:38 +0530, Ramkumar Ramachandra wrote: > > Davidlohr Bueso wrote: > > diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c > > index d318862..7784347 100644 > > --- a/tools/perf/builtin-lock.c > > +++ b/tools/perf/builtin-lock.c > > @@ -321,10 +321,12 @@ static struct lock_stat *lock_stat_findnew(void *addr, const char *name) > > > > new->addr = addr; > > new->name = zalloc(sizeof(char) * strlen(name) + 1); > > - if (!new->name) > > + if (!new->name) { > > + free(new); > > goto alloc_failed; > > - strcpy(new->name, name); > > + } > > Why is the strcpy() missing indent?
The strcpy() is removed. It doesn't miss indantation.
Thanks, Hitoshi
| |