aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/mi
diff options
context:
space:
mode:
authorMario Trangoni <mjtrangoni@gmail.com>2018-03-25 16:13:10 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-07-03 16:40:06 +0200
commit913fcf1a74426725f14380dd5b34286a21c37ab7 (patch)
tree70892161161325931ae5f1b444b277a4d9f0379d /nx-X11/programs/Xserver/mi
parentc58cbc26cc2a04fa06d22333ffe7ad52f7ede1fa (diff)
downloadnx-libs-913fcf1a74426725f14380dd5b34286a21c37ab7.tar.gz
nx-libs-913fcf1a74426725f14380dd5b34286a21c37ab7.tar.bz2
nx-libs-913fcf1a74426725f14380dd5b34286a21c37ab7.zip
Fix some memory leaks.
Diffstat (limited to 'nx-X11/programs/Xserver/mi')
-rw-r--r--nx-X11/programs/Xserver/mi/miexpose.c4
-rw-r--r--nx-X11/programs/Xserver/mi/mizerline.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/mi/miexpose.c b/nx-X11/programs/Xserver/mi/miexpose.c
index db7fdf010..a302bf578 100644
--- a/nx-X11/programs/Xserver/mi/miexpose.c
+++ b/nx-X11/programs/Xserver/mi/miexpose.c
@@ -766,11 +766,13 @@ int what;
screenContext[i] = CreateGC((DrawablePtr)pWin, (BITS32) 0,
(XID *)NULL, &status);
if (!screenContext[i])
+ free(prect);
return;
numGCs++;
if (!AddResource(FakeClientID(0), ResType,
(void *)screenContext[i]))
- return;
+ free(prect);
+ return;
}
pGC = screenContext[i];
newValues[SUBWINDOW].val = IncludeInferiors;
diff --git a/nx-X11/programs/Xserver/mi/mizerline.c b/nx-X11/programs/Xserver/mi/mizerline.c
index 49d87edd8..c68e2c9a3 100644
--- a/nx-X11/programs/Xserver/mi/mizerline.c
+++ b/nx-X11/programs/Xserver/mi/mizerline.c
@@ -158,7 +158,9 @@ miZeroLine(pDraw, pGC, mode, npt, pptInit)
pspanInit = (DDXPointPtr)malloc(list_len * sizeof(DDXPointRec));
pwidthInit = (int *)malloc(list_len * sizeof(int));
if (!pspanInit || !pwidthInit)
- return;
+ free(pspanInit);
+ free(pwidthInit);
+ return;
Nspans = 0;
new_span = TRUE;