aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
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/hw/nxagent/NXmiexpose.c
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/hw/nxagent/NXmiexpose.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
index 04f746aaf..a51ae6fcc 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c
@@ -629,11 +629,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;
+ (void *)screenContext[i]))
+ free(prect);
+ return;
}
pGC = screenContext[i];
newValues[SUBWINDOW].val = IncludeInferiors;