lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871u4mhvwm.wl%mitake.hitoshi@gmail.com>
Date:	Thu, 19 Sep 2013 02:39:05 +0900
From:	Hitoshi Mitake <mitake.hitoshi@...il.com>
To:	Ramkumar Ramachandra <artagnon@...il.com>
Cc:	Davidlohr Bueso <davidlohr@...com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Hitoshi Mitake <mitake@....info.waseda.ac.jp>,
	Aswin Chandramouleeswaran <aswin@...com>,
	LKML <linux-kernel@...r.kernel.org>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ