Re: patch[1/1] fix a memory leak in qxl_screen_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



it is needed to detect the return of qxl_uxa_init  in qxl_screen_init .






At 2013-11-06 21:59:58,"Jeremy White" <jwhite@xxxxxxxxxxxxxxx> wrote: >Nice catch! > >On 11/06/2013 03:37 AM, bigclouds wrote: >> hi, it allocate twice memory for qxl->uxa in function qxl_screen_init and qxl_uxa_init >> ----------------- >> diff --git a/src/qxl_driver.c b/src/qxl_driver.c >> index 91ba6c2..6be61e4 100644 >> --- a/src/qxl_driver.c >> +++ b/src/qxl_driver.c >> @@ -746,7 +746,9 @@ qxl_screen_init (SCREEN_INIT_ARGS_DECL) >>       } >>       qxl->uxa = uxa_driver_alloc (); >> - >> +    if (qxl->uxa == NULL) >> +return FALSE; >> + > >Wouldn't it be better to just delete this instance of the >allocation and leave it all in qxl_uxa.c? > >Also, just a kibitz, but most open source projects require >a full name on a submitted patch. > >Cheers, > >Jeremy >_______________________________________________ >Spice-devel mailing list >Spice-devel@xxxxxxxxxxxxxxxxxxxxx >http://lists.freedesktop.org/mailman/listinfo/spice-devel


_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]