Variable "table" goes out of scope
Reviewed-by: Ander Conselvan de Oliveira <[email protected]>
Signed-off-by: Erkki Seppälä <[email protected]>
---
src/Xrm.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/Xrm.c b/src/Xrm.c
index 21f0af3..3e68c37 100644
--- a/src/Xrm.c
+++ b/src/Xrm.c
@@ -842,8 +842,10 @@ static void PutEntry(
nprev = NodeBuckets(table); \
} else { \
table->leaf = 1; \
- if (!(nprev = (NTable *)Xmalloc(sizeof(VEntry *)))) \
+ if (!(nprev = (NTable *)Xmalloc(sizeof(VEntry *)))) {\
+ Xfree(table); \
return; \
+ } \
((LTable)table)->buckets = (VEntry *)nprev; \
} \
*nprev = (NTable)NULL; \
--
1.7.0.4
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel