[dpdk-stable] [dpdk-dev] [PATCH] lib/cmdline: release cl when cmdline exit

Peng, ZhihongX zhihongx.peng at intel.com
Mon Sep 6 07:45:24 CEST 2021



> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Wednesday, September 1, 2021 12:59 AM
> To: Peng, ZhihongX <zhihongx.peng at intel.com>
> Cc: olivier.matz at 6wind.com; dev at dpdk.org; stable at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] lib/cmdline: release cl when cmdline exit
> 
> On Tue, 31 Aug 2021 10:28:44 +0800
> zhihongx.peng at intel.com wrote:
> 
> > From: Zhihong Peng <zhihongx.peng at intel.com>
> >
> > 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 at dpdk.org
> >
> > Signed-off-by: Zhihong Peng <zhihongx.peng at intel.com>
> > ---
> >  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?
Use address-sanitizer.


More information about the stable mailing list