blob: fa8b4825f7e41aa82ff91c4ddfc8a6745a79f02e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
diff -ur a/dix/dixfonts.c b/dix/dixfonts.c
--- a/dix/dixfonts.c 2011-12-18 05:44:54.000000000 +0100
+++ b/dix/dixfonts.c 2013-10-10 12:06:44.579225694 +0200
@@ -1479,6 +1479,7 @@
GC *pGC;
unsigned char *data;
ITclosurePtr new_closure;
+ ITclosurePtr old_closure;
/* We're putting the client to sleep. We need to
save some state. Similar problem to that handled
@@ -1491,6 +1492,7 @@
err = BadAlloc;
goto bail;
}
+ old_closure = c;
*new_closure = *c;
c = new_closure;
@@ -1498,6 +1500,7 @@
if (!data)
{
free(c);
+ c = old_closure;
err = BadAlloc;
goto bail;
}
@@ -1509,6 +1512,7 @@
{
free(c->data);
free(c);
+ c = old_closure;
err = BadAlloc;
goto bail;
}
@@ -1522,6 +1526,7 @@
FreeScratchGC(pGC);
free(c->data);
free(c);
+ c = old_closure;
err = BadAlloc;
goto bail;
}
|