xserver-multidpi/randr
Alan Coopersmith c7b7abfaa0 RRModeCreate: plug memory leak of newModes if AddResource fails
Reported by parfait 1.0:

Error: Memory leak (CWE 401)
   Memory leak of pointer 'newModes' allocated with realloc(((char*)modes), ((num_modes + 1) * 8))
        at line 93 of randr/rrmode.c in function 'RRModeCreate'.
          pointer allocated at line 82 with realloc(((char*)modes), ((num_modes + 1) * 8)).
Error: Memory leak (CWE 401)
   Memory leak of pointer 'newModes' allocated with malloc(8)
        at line 93 of randr/rrmode.c in function 'RRModeCreate'.
          pointer allocated at line 84 with malloc(8).

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2012-08-06 15:22:53 -07:00
..
Makefile.am randr: add provider object and provider property support (v6) 2012-07-06 22:16:02 +01:00
randr.c Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
randrstr.h Move extension initialisation prototypes into extinit.h 2012-07-09 23:06:41 -07:00
rrcrtc.c Use C99 designated initializers in extension Events 2012-07-09 22:52:30 -07:00
rrdispatch.c Use C99 designated initializers in randr Replies 2012-07-09 19:58:30 -07:00
rrinfo.c randr: Clean up compiler warnings about unused and shadowing variables 2012-06-21 18:42:46 -07:00
rrmode.c RRModeCreate: plug memory leak of newModes if AddResource fails 2012-08-06 15:22:53 -07:00
rroutput.c Use C99 designated initializers in extension Events 2012-07-09 22:52:30 -07:00
rrpointer.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
rrproperty.c rrproperty.c: free newly allocated prop in more error paths 2012-08-06 15:22:53 -07:00
rrprovider.c Use C99 designated initializers in RandR 1.4 extension Replies 2012-07-16 21:25:07 -07:00
rrproviderproperty.c rrproviderproperty.c: free newly allocated prop in more error paths 2012-08-06 15:22:53 -07:00
rrscreen.c Use C99 designated initializers in RandR 1.4 extension Replies 2012-07-16 21:25:07 -07:00
rrsdispatch.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
rrtransform.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
rrtransform.h randr: Remove redundant declaration. 2012-05-14 13:16:54 +01:00
rrxinerama.c Use C99 designated initializers in randr Replies 2012-07-09 19:58:30 -07:00