diff options
author | Mihai Moldovan <ionic@ionic.de> | 2017-12-15 12:55:17 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-12-15 12:55:17 +0100 |
commit | 1dad092caf01d733990648e6df64cbf964df5143 (patch) | |
tree | 39de0e643e76754a3e23ca9dd0350b8ba4f76250 /debian/patches/1255_nx-X11_RRModeCreate-plug-memory-leak-of-newMode.full.patch | |
parent | 6d70b9e3c47f27a166f4aacb522c5c1e49092dd9 (diff) | |
parent | 2b9025f797ee322e21077e100c2ee27c2e7fa0e0 (diff) | |
download | nx-libs-1dad092caf01d733990648e6df64cbf964df5143.tar.gz nx-libs-1dad092caf01d733990648e6df64cbf964df5143.tar.bz2 nx-libs-1dad092caf01d733990648e6df64cbf964df5143.zip |
Merge branch '3.6.x'
Diffstat (limited to 'debian/patches/1255_nx-X11_RRModeCreate-plug-memory-leak-of-newMode.full.patch')
-rw-r--r-- | debian/patches/1255_nx-X11_RRModeCreate-plug-memory-leak-of-newMode.full.patch | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/debian/patches/1255_nx-X11_RRModeCreate-plug-memory-leak-of-newMode.full.patch b/debian/patches/1255_nx-X11_RRModeCreate-plug-memory-leak-of-newMode.full.patch deleted file mode 100644 index 11b4579f8..000000000 --- a/debian/patches/1255_nx-X11_RRModeCreate-plug-memory-leak-of-newMode.full.patch +++ /dev/null @@ -1,40 +0,0 @@ -commit 0fc419314b3bbafa873207dafa57ce92b4b9e1e1 -Author: Alan Coopersmith <alan.coopersmith@oracle.com> -Date: Sat Jul 14 11:21:15 2012 -0700 - - 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> - - Backported from Arctica GH 3.6.x branch. - - v2: backport to nx-libs 3.6.x (Ulrich Sibiller) - v3: backport to nx-libs 3.5.0.x (Mihai Moldovan) - ---- a/nx-X11/programs/Xserver/randr/rrmode.c -+++ b/nx-X11/programs/Xserver/randr/rrmode.c -@@ -98,8 +98,10 @@ RRModeCreate (xRRModeInfo *modeInfo, - } - - mode->mode.id = FakeClientID(0); -- if (!AddResource (mode->mode.id, RRModeType, (pointer) mode)) -- return NULL; -+ if (!AddResource(mode->mode.id, RRModeType, (pointer) mode)) { -+ free(newModes); -+ return NULL; -+ } - modes = newModes; - modes[num_modes++] = mode; - |