* [PATCH] libs/devicemodel: initialise op_bufs in xendevicemodel_xcall
@ 2017-02-23 15:18 Wei Liu
2017-02-23 15:54 ` Ian Jackson
0 siblings, 1 reply; 2+ messages in thread
From: Wei Liu @ 2017-02-23 15:18 UTC (permalink / raw)
To: Xen-devel; +Cc: Ian Jackson, Paul Durrant, Wei Liu
To avoid freeing uninitialised buffer when taking the first error exit
path.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Paul Durrant <paul.durrant@citrix.com>
---
tools/libs/devicemodel/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/libs/devicemodel/core.c b/tools/libs/devicemodel/core.c
index 504543c1c5..19ebef63b3 100644
--- a/tools/libs/devicemodel/core.c
+++ b/tools/libs/devicemodel/core.c
@@ -79,7 +79,7 @@ int xendevicemodel_xcall(xendevicemodel_handle *dmod,
{
int ret = -1;
void **xcall_bufs;
- xen_dm_op_buf_t *op_bufs;
+ xen_dm_op_buf_t *op_bufs = NULL;
unsigned int i;
xcall_bufs = calloc(nr_bufs, sizeof(*xcall_bufs));
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libs/devicemodel: initialise op_bufs in xendevicemodel_xcall
2017-02-23 15:18 [PATCH] libs/devicemodel: initialise op_bufs in xendevicemodel_xcall Wei Liu
@ 2017-02-23 15:54 ` Ian Jackson
0 siblings, 0 replies; 2+ messages in thread
From: Ian Jackson @ 2017-02-23 15:54 UTC (permalink / raw)
To: Wei Liu; +Cc: Xen-devel, Paul Durrant
Wei Liu writes ("[PATCH] libs/devicemodel: initialise op_bufs in xendevicemodel_xcall"):
> To avoid freeing uninitialised buffer when taking the first error exit
> path.
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-23 15:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-23 15:18 [PATCH] libs/devicemodel: initialise op_bufs in xendevicemodel_xcall Wei Liu
2017-02-23 15:54 ` Ian Jackson
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.