On Wed, Nov 26, 2014 at 03:33:16PM +0100, Marek Chalupa wrote: > On 21 November 2014 at 07:21, Bryce Harrington <[email protected]> > wrote: > > > Signed-off-by: Bryce Harrington <[email protected]> > > > > - if (do_yflip) > > - recorder->tmpbuf = NULL; > > - else > > + if (!do_yflip) > > recorder->tmpbuf = malloc(size); > > > > Here you don't check the malloc's result.
Good point. The original code didn't either, but weston_recorder_frame_notify() looks like it assumes tmpbuf is valid and would crash there otherwise. I can add this. > Also in weston_recorder_destroy > there's no check that tmpbuf was allocated before freeing that memory. Actually it's unnecessary to check for NULL before calling free(). free(NULL) is a no-op as per `man 3 malloc`. Thanks for the review! Bryce _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
