From: Ian Jackson Subject: Re: [PATCH v2-resend 22/30] libxl: ocaml: event management [and 1 more messages] Date: Thu, 28 Nov 2013 16:46:55 +0000 Message-ID: <21143.29567.681466.732240@mariner.uk.xensource.com> References: <1383760205-20397-1-git-send-email-rob.hoes@citrix.com> <1383760205-20397-19-git-send-email-rob.hoes@citrix.com> <1377168678-25492-1-git-send-email-rob.hoes@citrix.com> <1377168678-25492-23-git-send-email-rob.hoes@citrix.com> <21020.59469.965364.832725@mariner.uk.xensource.com> <21120.60611.692531.460725@mariner.uk.xensource.com> <360717C0B01E6345BCBE64B758E22C2D16EB79@AMSPEX01CL03.citrite.net> <21122.16826.622192.625659@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21122.16826.622192.625659@mariner.uk.xensource.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: Rob Hoes , xen-devel@lists.xen.org, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org Ian Jackson writes ("Re: [Xen-devel] [PATCH v2-resend 22/30] libxl: ocaml: event management [and 1 more messages]"): > > +value stub_libxl_event_register_callbacks(value ctx, value user) > ... > > + c_user = malloc(sizeof(*c_user)); > > + c_user->user = (void *) user; > > Shouldn't you be using some kind of error-handling wrapper for > malloc ? Having the program dereference null when malloc fails is > rather an unfortunate failure mode. At the very least printing > something to stderr would be useful. There's some more of this in v6. I don't think it's a blocker for inclusion but I thought I'd mention it again since my comment seems to have been overlooked. Thanks, Ian.