diff options
-rw-r--r-- | nx-X11/lib/X11/Xrm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nx-X11/lib/X11/Xrm.c b/nx-X11/lib/X11/Xrm.c index 818e72906..2900816c1 100644 --- a/nx-X11/lib/X11/Xrm.c +++ b/nx-X11/lib/X11/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; \ |