_XimLocalDestroyIC:fix possible mem leak

Adapted:
Fix XCreateIC() memory leak by Patrick Lerda <patrick9876@free.fr> Part 1
This commit is contained in:
Walter Harms 2024-01-08 16:21:02 +01:00
parent 07978634b8
commit ed0b97e480

View file

@ -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);
}