From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Daley Subject: Re: [PATCH 11/28] libxl: only put poller if already gotten in libxl_event_wait Date: Thu, 19 Sep 2013 01:06:02 +1200 Message-ID: References: <1379475484-25993-1-git-send-email-mattjd@gmail.com> <1379475484-25993-12-git-send-email-mattjd@gmail.com> <52399CA2.8080504@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <52399CA2.8080504@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Stefano Stabellini , Ian Jackson , Ian Campbell , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Thu, Sep 19, 2013 at 12:29 AM, Andrew Cooper wrote: > On 18/09/2013 04:37, Matthew Daley wrote: >> Coverity-ID: 1055292 >> Signed-off-by: Matthew Daley >> --- >> tools/libxl/libxl_event.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c >> index e42b371..fd2f280 100644 >> --- a/tools/libxl/libxl_event.c >> +++ b/tools/libxl/libxl_event.c >> @@ -1476,7 +1476,7 @@ int libxl_event_wait(libxl_ctx *ctx, libxl_event **event_r, >> } >> >> out: >> - libxl__poller_put(ctx, poller); >> + if (poller) libxl__poller_put(ctx, poller); > > Coding style would require the code to look like this: > > if ( poller ) > libxl__poller_put(ctx, poller); Indeed. I was going off the check just after the call to libxl__poller get (and possibly confusing the style with Mini-OS's), but I suppose this is only for rc/error-type checks. I'll resend a fixed patch. - Matthew