From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 37706A0C56; Tue, 31 Aug 2021 18:59:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20BA54068A; Tue, 31 Aug 2021 18:59:08 +0200 (CEST) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by mails.dpdk.org (Postfix) with ESMTP id DD1704067E for ; Tue, 31 Aug 2021 18:59:06 +0200 (CEST) Received: by mail-pj1-f46.google.com with SMTP id z24-20020a17090acb1800b0018e87a24300so2960683pjt.0 for ; Tue, 31 Aug 2021 09:59:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7P26MkiZSdPiun4lrgAhuqgZXJOw37yQvLQ1IFJ0qy8=; b=ORzobs2lFSDsQie1cRVkiNZ4hTvMjZZaIb3wGzgBIcXyCuah0ElX0EdhqkDFqWNrqw talbxbu6BQptPYzCGxyrw4OR+OmHa7uQIOyvN8Fv5KhSfUIZMpRgrxFoh7kN1tmUiIrm /6ZqjwUlkS+/PXEzY5cLFkRv1j3+hqhGmJj25LP1KIML+vluMPIaZ7BiCnkSA4lG+q4f uXiLDU1Y8ojnjmJnzXkqwRYLNn+F6RYWOwkUkIH05Hy2VlnzSQMNmX7Ky2X6mvP15ERA sN+nfr/RzmKvx2hJ6YjKtknluegHkOQj9tCWFGQ1ozjU0Q4X5tU8cYm95EucqFj6ULsQ BMGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7P26MkiZSdPiun4lrgAhuqgZXJOw37yQvLQ1IFJ0qy8=; b=M7qvaksLeiJIFKIttxWnIsyVdIimrAmuvQTscf+20iLCMwOOHGZsETvyjSBvd00Zlf Ca6YttbpRpFLjZMwzMxiVlJTR3RNqlqJX9l0oka+VLsy7tyhCjCM4o6QTrrsgv3TiYLF /KJXG9sPdVRABlylN4tM/oNp1/LYerzhGeLJQmNTHr1bkuXiF6ZBeoOjycu9IPlw7mqt OJptuMSH4wN+rBgSc4sn7K0XbRMBy2Kd93crFngqGD1QFMOJu7oQw8b9UCGAUortTTxM gdWGlw8wiR4tcVUTGWnHzSi4CRvhOs10e8MSqSYf087hrQBfPjDS1zP+OHnNwFfAAKnY V2Dg== X-Gm-Message-State: AOAM533d3C6nkRNNJCJ728tuHeWcTamyXWCeOBd+TI1zGxbqK5a/4Hmi TiBmU0l9bSmXgo7btVnvfHYaUA== X-Google-Smtp-Source: ABdhPJwp8VibTFvadnTTnRqOP4ACE/aaZr7yB8PVuO82fP4fkkp3Ihqu/KY3qgf52Y4512s9AMjrQw== X-Received: by 2002:a17:902:650b:b0:137:3940:ec24 with SMTP id b11-20020a170902650b00b001373940ec24mr5567730plk.36.1630429146107; Tue, 31 Aug 2021 09:59:06 -0700 (PDT) Received: from hermes.local (204-195-33-123.wavecable.com. [204.195.33.123]) by smtp.gmail.com with ESMTPSA id i14sm18267406pfd.112.2021.08.31.09.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Aug 2021 09:59:05 -0700 (PDT) Date: Tue, 31 Aug 2021 09:59:03 -0700 From: Stephen Hemminger To: zhihongx.peng@intel.com Cc: olivier.matz@6wind.com, dev@dpdk.org, stable@dpdk.org Message-ID: <20210831095903.3eb3324e@hermes.local> In-Reply-To: <20210831022844.18057-1-zhihongx.peng@intel.com> References: <20210831022844.18057-1-zhihongx.peng@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] lib/cmdline: release cl when cmdline exit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, 31 Aug 2021 10:28:44 +0800 zhihongx.peng@intel.com wrote: > From: Zhihong Peng > > Malloc cl in the cmdline_stdin_new function, so release in the > cmdline_stdin_exit function is logical, so that cl will not be > released alone. > > Fixes: af75078fece3 (first public release) > Cc: stable@dpdk.org > > Signed-off-by: Zhihong Peng > --- > lib/cmdline/cmdline_socket.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/cmdline/cmdline_socket.c b/lib/cmdline/cmdline_socket.c > index 998e8ade25..ebd5343754 100644 > --- a/lib/cmdline/cmdline_socket.c > +++ b/lib/cmdline/cmdline_socket.c > @@ -53,4 +53,5 @@ cmdline_stdin_exit(struct cmdline *cl) > return; > > terminal_restore(cl); > + cmdline_free(cl); > } How did you find this? valgrind? address-sanitizer?