From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2EB5AC433DF for ; Thu, 11 Jun 2020 14:13:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 09ACF20853 for ; Thu, 11 Jun 2020 14:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591884827; bh=0kiUXeRTZ66L3vUIP0L9Xwoi5v+ZUuZDVVJDelcBnp0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=Hmpd3F+f71Hoz5sdaLKlhuTUStitJeQZMfHcpeDAm/GFnQH47Q14XWhPY98ErZwAl pAS1/VTugyFtHDaFCif6POgxblO7mHCXUNCUX73Gh9RGZ6NfdmOqZYLPY+xk6hHp3J nNaIVpfGFEoxpkobW9jGq8g4kMpJUJjim8Kt9tOE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728228AbgFKONp (ORCPT ); Thu, 11 Jun 2020 10:13:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:34108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727053AbgFKONo (ORCPT ); Thu, 11 Jun 2020 10:13:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id ECB812083E; Thu, 11 Jun 2020 14:13:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591884823; bh=0kiUXeRTZ66L3vUIP0L9Xwoi5v+ZUuZDVVJDelcBnp0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dVaGBquUHsmhWX/kn/9h9/JaM05ooLcC2/xQJKi+feAgsBmhaRhYQkpz/UsCny/SI xUSVWtgbUqQa5Kv6njM5l0LjIpcq1gLFDKjxEj/LAdGx0y0ZO0+sDnzZjTY89YRYO2 h3F8Nm778TKQSUW78UgkXsQravd7KrXAqunDowv8= Date: Thu, 11 Jun 2020 16:13:37 +0200 From: Greg KH To: Markus Elfring Cc: Chen Wandun , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org, Yonghong Song , Song Liu , Peter Zijlstra , Adrian Hunter , Alexander Shishkin , Andrii Nakryiko , Arnaldo Carvalho de Melo , Cheng Jian , Daniel Borkmann , Ian Rogers , Ingo Molnar , Jiri Olsa , John Fastabend , Leo Yan , Mark Rutland , Martin KaFai Lau , Namhyung Kim Subject: Re: [PATCH] perf tools: Fix potential memory leak in perf events parser Message-ID: <20200611141337.GB1134057@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 11, 2020 at 03:17:17PM +0200, Markus Elfring wrote: > > Fix potential memory leak in function parse_events_term__sym_hw() > > and parse_events_term__clone(). > > Would you like to add the tag “Fixes” to the commit message? > > > … > > +++ b/tools/perf/util/parse-events.c > … > > @@ -2957,9 +2958,20 @@ int parse_events_term__sym_hw(struct parse_events_term **term, > > sym = &event_symbols_hw[idx]; > > > > str = strdup(sym->symbol); > > - if (!str) > > + if (!str) { > > + if (!config) > > + free(temp.config); > > return -ENOMEM; > > - return new_term(term, &temp, str, 0); > > + } > > + > > + ret = new_term(term, &temp, str, 0); > > + if (ret < 0) { > > + free(str); > > + if (!config) > > + free(temp.config); > > + } > > + > > + return ret; > > } > … > > How do you think about to add jump targets for a bit of > common exception handling code in these function implementations? Hi, This is the semi-friendly patch-bot of Greg Kroah-Hartman. Markus, you seem to have sent a nonsensical or otherwise pointless review comment to a patch submission on a Linux kernel developer mailing list. I strongly suggest that you not do this anymore. Please do not bother developers who are actively working to produce patches and features with comments that, in the end, are a waste of time. Patch submitter, please ignore Markus's suggestion; you do not need to follow it at all. The person/bot/AI that sent it is being ignored by almost all Linux kernel maintainers for having a persistent pattern of behavior of producing distracting and pointless commentary, and inability to adapt to feedback. Please feel free to also ignore emails from them. thanks, greg k-h's patch email bot