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:
Ian Campbell committed 2016-02-03 11:23:43 +00:00
1 parent cc449379d9
commit 7db1f6a67d
2 files changed
+3

No files matched your search

+2
View File
@@ -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;
+1
View File
@@ -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;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.