summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/stubs/atom.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stubs/atom.c b/src/stubs/atom.c
index 367ddc9..4163ee7 100644
--- a/src/stubs/atom.c
+++ b/src/stubs/atom.c
@@ -188,8 +188,10 @@ __libxfont_internal__MakeAtom(const char *string, unsigned len, int makeit)
a->hash = hash;
if (hashUsed >= hashSize / 2) {
if ((ResizeHashTable() == FALSE) &&
- ((hashTable == NULL) || (hashUsed == hashSize)))
+ ((hashTable == NULL) || (hashUsed == hashSize))) {
+ free(a);
return None;
+ }
h = hash & hashMask;
if (hashTable[h]) {
r = (hash % rehash) | 1;