Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753132Ab3IRRjY (ORCPT ); Wed, 18 Sep 2013 13:39:24 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:38595 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752669Ab3IRRjW (ORCPT ); Wed, 18 Sep 2013 13:39:22 -0400 Date: Thu, 19 Sep 2013 02:39:05 +0900 Message-ID: <871u4mhvwm.wl%mitake.hitoshi@gmail.com> From: Hitoshi Mitake To: Ramkumar Ramachandra Cc: Davidlohr Bueso , Arnaldo Carvalho de Melo , Frederic Weisbecker , Ingo Molnar , Peter Zijlstra , Hitoshi Mitake , Aswin Chandramouleeswaran , LKML Subject: Re: [PATCH 3/7] perf lock: plug some memleaks In-Reply-To: References: <1378693159-8747-1-git-send-email-davidlohr@hp.com> <1378693159-8747-4-git-send-email-davidlohr@hp.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29qGyQoRCtXGyhC?=) APEL/10.8 Emacs/23.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1003 Lines: 30 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/