From c1f3f1748daec78533911035d0aaa07666bf8ea8 Mon Sep 17 00:00:00 2001 From: Matthew Daley Date: Sun, 29 Sep 2013 18:24:36 +1300 Subject: libxl: only put poller if already gotten in libxl_event_wait Coverity-ID: 1055292 Signed-off-by: Matthew Daley Acked-by: Ian Campbell --- tools/libxl/libxl_event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c index e42b371765..6f033dd4b3 100644 --- a/tools/libxl/libxl_event.c +++ b/tools/libxl/libxl_event.c @@ -1476,7 +1476,8 @@ int libxl_event_wait(libxl_ctx *ctx, libxl_event **event_r, } out: - libxl__poller_put(ctx, poller); + if (poller) + libxl__poller_put(ctx, poller); CTX_UNLOCK; EGC_FREE; -- cgit v1.2.3