mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-08 12:38:04 +02:00
_XimLocalDestroyIC:fix possible mem leak
Adapted: Fix XCreateIC() memory leak by Patrick Lerda <patrick9876@free.fr> Part 1
This commit is contained in:
parent
07978634b8
commit
ed0b97e480
1 changed files with 7 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue