~ubuntu-branches/ubuntu/breezy/libx11/breezy

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
$Id$

Fixes SEGV in _XimRegisterKeyPressFilter() if _XimProtoCreateIC() failed to
create an input context.  See Debian #239991.

This patch by Chung-chieh Shan.

Not submitted to XFree86.

--- xc/lib/X11/imDefIc.c~	2004-04-21 12:09:52.000000000 -0500
+++ xc/lib/X11/imDefIc.c	2004-04-21 12:10:17.000000000 -0500
@@ -1546,6 +1546,7 @@
     return (XIC)ic;
 
 ErrorOnCreatingIC:
+    _XimUnregisterFilter(ic);
     if (ic->private.proto.ic_resources)
 	Xfree(ic->private.proto.ic_resources);
     if (ic->private.proto.ic_inner_resources)