mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools: libxencall/foreignmemory: initialise handle->fd
Otherwise the osdep close on the error path touches an uninitialised varialble. CID: 1351231 (foreignmemory) and 1351230 (call) Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
cc449379d9
commit
7db1f6a67d
2 files changed
+3
No files matched your search
@@ -24,6 +24,8 @@ xencall_handle *xencall_open(xentoollog_logger *logger, unsigned open_flags)
|
||||
|
||||
if (!xcall) return NULL;
|
||||
|
||||
xcall->fd = -1;
|
||||
|
||||
xcall->flags = open_flags;
|
||||
xcall->buffer_cache_nr = 0;
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ xenforeignmemory_handle *xenforeignmemory_open(xentoollog_logger *logger,
|
||||
|
||||
if (!fmem) return NULL;
|
||||
|
||||
fmem->fd = -1;
|
||||
fmem->logger = logger;
|
||||
fmem->logger_tofree = NULL;
|
||||
|
||||
|
||||