|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 5/7] libxl: vNUMA configuration parser
On Tue, Nov 19, 2013 at 9:24 AM, Elena Ufimtseva <ufimtseva@xxxxxxxxx> wrote:
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index 8690ec7..d7aa0b3 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -40,6 +40,7 @@
> #include "libxl_json.h"
> #include "libxlutil.h"
> #include "xl.h"
> +#include "libxl_vnuma.h"
>
> #define CHK_ERRNO( call ) ({ \
> int chk_errno = (call); \
> @@ -572,6 +573,75 @@ vcpp_out:
> return rc;
> }
>
> +static void vnuma_info_release(libxl_domain_build_info *info)
> +{
> + if ( info->vnuma_memszs ) free(info->vnuma_memszs);
> + if ( info->vdistance ) free(info->vdistance);
> + if ( info->vcpu_to_vnode ) free(info->vcpu_to_vnode);
> + if ( info->vnode_to_pnode ) free(info->vnode_to_pnode);
You don't need to check for NULL before passing a pointer to free. I
just removed most instances of this pattern Xenwide and I'd hate to
have some reintroduced :)
- Matthew
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |