]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
libxenforeignmemory: handle partial failure correctly
authorIan Campbell <ian.campbell@citrix.com>
Wed, 3 Feb 2016 10:10:01 +0000 (10:10 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 3 Feb 2016 11:23:08 +0000 (11:23 +0000)
commitcc449379d9932c2fec23c5b8e838e01c837660a7
tree02e5e8a2dad61a3aa9727f7e11565f95e85ef6c7
parent5e403ca3da791bf2a6001d1fc3d7def180c0e439
libxenforeignmemory: handle partial failure correctly

Coverity rightly points out that checking for ret == NULL and then
calling osdep unmap(ret) is wrong.

The intention on this code path is to turn partial failure into total
failure when the err argument is NULL, so we want to take this patch
whenever ret is _non_ NULL (and err_to_free is set, indicating err was
NULL).

CID: 1351219

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libs/foreignmemory/core.c