projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be6b316
)
libs/devicemodel: initialise op_bufs in xendevicemodel_xcall
author
Wei Liu
<wei.liu2@citrix.com>
Thu, 23 Feb 2017 15:18:20 +0000
(15:18 +0000)
committer
Wei Liu
<wei.liu2@citrix.com>
Thu, 23 Feb 2017 15:59:36 +0000
(15:59 +0000)
To avoid freeing uninitialised buffer when taking the first error exit
path.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libs/devicemodel/core.c
patch
|
blob
|
history
diff --git
a/tools/libs/devicemodel/core.c
b/tools/libs/devicemodel/core.c
index 504543c1c58b5daf241855f401b1a1b122042a56..19ebef63b3b51fd9c8c3858cf7d29c26f9fefae6 100644
(file)
--- 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));