From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] xenpaging: do not leak if --pagefile given twice Date: Wed, 17 Feb 2016 14:23:26 -0500 Message-ID: <20160217192326.GA25212@char.us.oracle.com> References: <1455721113-11540-1-git-send-email-ian.campbell@citrix.com> <20160217191438.GH24109@char.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20160217191438.GH24109@char.us.oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Wed, Feb 17, 2016 at 02:14:38PM -0500, Konrad Rzeszutek Wilk wrote: > On Wed, Feb 17, 2016 at 02:58:33PM +0000, Ian Campbell wrote: > > By freeing filename (which is either NULL or the previous iteration of > > this argument). This implements a semantic where the last --pagefile > > given on the command line takes precedence. > > > > This is the same semantic as the other options have. > > > > CID: 1198792 > > > > Reviewed-by: Konrad Rzeszutek Wilk and applied. Figured nobody would mind this fix. > > > Signed-off-by: Ian Campbell > > --- > > tools/xenpaging/xenpaging.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/tools/xenpaging/xenpaging.c b/tools/xenpaging/xenpaging.c > > index 0377507..6157d3a 100644 > > --- a/tools/xenpaging/xenpaging.c > > +++ b/tools/xenpaging/xenpaging.c > > @@ -232,6 +232,7 @@ static int xenpaging_getopts(struct xenpaging *paging, int argc, char *argv[]) > > paging->vm_event.domain_id = atoi(optarg); > > break; > > case 'f': > > + free(filename); > > filename = strdup(optarg); > > break; > > case 'm': > > -- > > 2.1.4 > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xen.org > > http://lists.xen.org/xen-devel