|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 02/13] libxl: check for xc_domain_setmaxmem failure in libxl__build_pre
Matthew Daley writes ("[PATCH 02/13] libxl: check for xc_domain_setmaxmem
failure in libxl__build_pre"):
> Coverity-ID: 1087115
...
> - xc_domain_setmaxmem(ctx->xch, domid, info->target_memkb +
> LIBXL_MAXMEM_CONSTANT);
> + rc = xc_domain_setmaxmem(ctx->xch, domid, info->target_memkb +
> LIBXL_MAXMEM_CONSTANT);
> + if (rc != 0) {
> + LOG(ERROR, "Couldn't set max memory");
> + return rc;
> + }
xc_domain_setmaxmem returns -1 on error, setting errno. rc is
supposed to be a libxl error number.
There are a lot of wrong (and also deviant) error handling patterns in
libxl_dom.c. I would recommend using the idiom found in
libxl_domain_unpause in libxl.c.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |