aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11
diff options
context:
space:
mode:
authorErkki Seppälä <erkki.seppala@vincit.fi>2011-01-31 14:01:58 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:27 +0200
commit78b0ca2fe42ca998708490854d5f5f38ca90d0a8 (patch)
tree5b8d287aaf7b421040961766f75397ecb182c8b8 /nx-X11/lib/X11
parentb00312f5d4e09ade3e91e5d6c5f7c847c474fb58 (diff)
downloadnx-libs-78b0ca2fe42ca998708490854d5f5f38ca90d0a8.tar.gz
nx-libs-78b0ca2fe42ca998708490854d5f5f38ca90d0a8.tar.bz2
nx-libs-78b0ca2fe42ca998708490854d5f5f38ca90d0a8.zip
ximcp/imRmAttr: Handle leaking colormap_ret
XFree colormap_ret and initialize it when appropriate. Variable "colormap_ret" goes out of scope Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11')
-rw-r--r--nx-X11/lib/X11/imRmAttr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nx-X11/lib/X11/imRmAttr.c b/nx-X11/lib/X11/imRmAttr.c
index b5abcdd75..ef3ac2ca7 100644
--- a/nx-X11/lib/X11/imRmAttr.c
+++ b/nx-X11/lib/X11/imRmAttr.c
@@ -960,6 +960,7 @@ _XimEncodePreeditValue(
&count, (Atom)p->value)))
return False;
+ XFree(colormap_ret);
} else if (res->xrm_name == XrmStringToQuark(XNFontSet)) {
int list_ret;
XFontStruct **struct_list;
@@ -1003,7 +1004,7 @@ _XimEncodeStatusValue(
XIMArg *p)
{
if (res->xrm_name == XrmStringToQuark(XNStdColormap)) {
- XStandardColormap *colormap_ret;
+ XStandardColormap *colormap_ret = NULL;
int count;
if (!(XGetRGBColormaps(ic->core.im->core.display,
@@ -1011,6 +1012,7 @@ _XimEncodeStatusValue(
&count, (Atom)p->value)))
return False;
+ XFree(colormap_ret);
} else if (res->xrm_name == XrmStringToQuark(XNFontSet)) {
int list_ret;
XFontStruct **struct_list;