[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 17/29] libxl: don't leak memory in libxl__poller_get failure case
Coverity-ID: 1055894 Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx> --- tools/libxl/libxl_event.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c index a5c52bc..824bdd2 100644 --- a/tools/libxl/libxl_event.c +++ b/tools/libxl/libxl_event.c @@ -1340,7 +1340,10 @@ libxl__poller *libxl__poller_get(libxl_ctx *ctx) memset(p, 0, sizeof(*p)); rc = libxl__poller_init(ctx, p); - if (rc) return NULL; + if (rc) { + free(p); + return NULL; + } return p; } -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |