From: Wei Liu Date: Thu, 23 Feb 2017 15:18:20 +0000 (+0000) Subject: libs/devicemodel: initialise op_bufs in xendevicemodel_xcall X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~2700 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e318fa314550b1978525aef30c325715a41aa0b7;p=xen.git libs/devicemodel: initialise op_bufs in xendevicemodel_xcall To avoid freeing uninitialised buffer when taking the first error exit path. Signed-off-by: Wei Liu Acked-by: Ian Jackson --- 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));