From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751318AbaAEPzd (ORCPT ); Sun, 5 Jan 2014 10:55:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:30498 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751112AbaAEPzc (ORCPT ); Sun, 5 Jan 2014 10:55:32 -0500 Date: Sun, 5 Jan 2014 16:55:10 +0100 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Peter Zijlstra , Paul Mackerras , Ingo Molnar , Namhyung Kim , LKML , Arun Sharma , Frederic Weisbecker , Rodrigo Campos , Stephane Eranian Subject: Re: [PATCH 01/21] perf tools: Introduce struct add_entry_iter Message-ID: <20140105155510.GA9441@krava.brq.redhat.com> References: <1387873347-28838-1-git-send-email-namhyung@kernel.org> <1387873347-28838-2-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1387873347-28838-2-git-send-email-namhyung@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 24, 2013 at 05:22:07PM +0900, Namhyung Kim wrote: > From: Namhyung Kim SNIP > + > +out: > + iter->curr++; > + return err; > +} > + > +static int > +iter_finish_branch_entry(struct add_entry_iter *iter, > + struct addr_location *al __maybe_unused) > +{ > + free(iter->priv); > + iter->priv = NULL; so branch_info is duplicated in the hist_entry__new.. it's not easy to find why this one gets freed while mem_info stays ;-) some comment about that here would help jirka