diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-07-14 11:21:15 -0700 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2015-06-07 00:09:02 +0200 |
commit | 0fc419314b3bbafa873207dafa57ce92b4b9e1e1 (patch) | |
tree | 23544295c9991d13a76e598db5c4fe2cb80c8190 /nxcomp/ChannelCache.cpp | |
parent | faddfbec6ff331c3859e2f57040da4a8cf072baa (diff) | |
download | nx-libs-0fc419314b3bbafa873207dafa57ce92b4b9e1e1.tar.gz nx-libs-0fc419314b3bbafa873207dafa57ce92b4b9e1e1.tar.bz2 nx-libs-0fc419314b3bbafa873207dafa57ce92b4b9e1e1.zip |
Backport: 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>
Diffstat (limited to 'nxcomp/ChannelCache.cpp')
0 files changed, 0 insertions, 0 deletions