* [PATCH] xenpaging: do not leak if --pagefile given twice
@ 2016-02-17 14:58 Ian Campbell
2016-02-17 19:14 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 3+ messages in thread
From: Ian Campbell @ 2016-02-17 14:58 UTC (permalink / raw)
To: ian.jackson, wei.liu2, xen-devel; +Cc: Ian Campbell
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
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xenpaging: do not leak if --pagefile given twice
2016-02-17 14:58 [PATCH] xenpaging: do not leak if --pagefile given twice Ian Campbell
@ 2016-02-17 19:14 ` Konrad Rzeszutek Wilk
2016-02-17 19:23 ` Konrad Rzeszutek Wilk
0 siblings, 1 reply; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-02-17 19:14 UTC (permalink / raw)
To: Ian Campbell; +Cc: wei.liu2, ian.jackson, xen-devel
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 <konrad.wilk@oracle.com>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xenpaging: do not leak if --pagefile given twice
2016-02-17 19:14 ` Konrad Rzeszutek Wilk
@ 2016-02-17 19:23 ` Konrad Rzeszutek Wilk
0 siblings, 0 replies; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-02-17 19:23 UTC (permalink / raw)
To: Ian Campbell; +Cc: wei.liu2, ian.jackson, xen-devel
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 <konrad.wilk@oracle.com>
and applied. Figured nobody would mind this fix.
>
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > ---
> > 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-17 19:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-17 14:58 [PATCH] xenpaging: do not leak if --pagefile given twice Ian Campbell
2016-02-17 19:14 ` Konrad Rzeszutek Wilk
2016-02-17 19:23 ` Konrad Rzeszutek Wilk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.