summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter Harms <wharms@bfs.de>2024-01-08 16:21:02 +0100
committerWalter Harms <wharms@bfs.de>2024-01-08 16:21:02 +0100
commited0b97e480d7d07c24719007273989b2eb3e4046 (patch)
tree155620c16cede98c66540a1df4ee1091eced5dd9
parent07978634b8f4f7d9537c7f46ddcd48f2ab3efcb8 (diff)
_XimLocalDestroyIC:fix possible mem leak
Adapted: Fix XCreateIC() memory leak by Patrick Lerda <patrick9876@free.fr> Part 1
-rw-r--r--modules/im/ximcp/imLcIc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/modules/im/ximcp/imLcIc.c b/modules/im/ximcp/imLcIc.c
index a8c925f0..a3b6c1f5 100644
--- a/modules/im/ximcp/imLcIc.c
+++ b/modules/im/ximcp/imLcIc.c
@@ -65,6 +65,12 @@ _XimLocalDestroyIC(
Xfree(ic->private.local.ic_resources);
ic->private.local.ic_resources = NULL;
+ Xfree(ic->core.res_name);
+ ic->core.res_name=NULL;
+
+ Xfree(ic->core.res_class);
+ ic->core.res_class = NULL;
+
return;
}
@@ -194,6 +200,7 @@ Set_Error :
Xfree(ic->private.local.ic_resources);
ic->private.local.ic_resources = NULL;
+
Xfree(ic);
return((XIC)NULL);
}