libxl: don't leak memory in libxl__poller_get failure case

Coverity-ID: 1055894
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
(cherry picked from commit 1edd6d8da3)
This commit is contained in:
Matthew Daley authored and Ian Jackson committed 2015-08-12 12:39:10 +01:00
1 parent 32f82fa8d9
commit e9a0fc5998
1 file changed
+4 -1
+4 -1
View File
@@ -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;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.