[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] tools/libxl: Correct use of phyinfo_{init, dispose}()
On 04/08/2015 22:25, Wei Liu wrote: > On Tue, Aug 04, 2015 at 07:58:38PM +0100, Andrew Cooper wrote: >> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> >> --- > [...] >> index bfc9699..13dc2de 100644 >> --- a/tools/libxl/libxl_utils.c >> +++ b/tools/libxl/libxl_utils.c >> @@ -848,11 +848,10 @@ int libxl__count_physical_sockets(libxl__gc *gc, int >> *sockets) >> libxl_physinfo_init(&info); >> >> rc = libxl_get_physinfo(CTX, &info); >> - if (rc) >> - return rc; >> - >> - *sockets = info.nr_cpus / info.threads_per_core >> - / info.cores_per_socket; >> + if (!rc) { >> + *sockets = info.nr_cpus / info.threads_per_core >> + / info.cores_per_socket; >> + } >> >> libxl_physinfo_dispose(&info); >> return 0; > This should return rc. Coverity spotted that too. It is fixed in v2 which I havn't posted yet, mainly pending the maintainers decision as to whether this patch is worth persuing for 4.6 or not. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |