summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2013-02-26 23:03:32 (GMT)
committer Chris Young <chris@unsatisfactorysoftware.co.uk>2013-02-26 23:03:32 (GMT)
commit07126ad732a9d90de6c0ddce5da4712754654eee (patch)
treee8f211dc5a81539461f2993934aecb5eba449e75
parent92055076997294c7f360eaec53452a5468785489 (diff)
downloadlibwapcaplet-07126ad732a9d90de6c0ddce5da4712754654eee.tar.gz
libwapcaplet-07126ad732a9d90de6c0ddce5da4712754654eee.tar.bz2
Only return if we've allocated memory, otherwise we're erroring out without trying the second pool.
-rw-r--r--src/libwapcaplet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libwapcaplet.c b/src/libwapcaplet.c
index 4cbb555..44aa919 100644
--- a/src/libwapcaplet.c
+++ b/src/libwapcaplet.c
@@ -72,7 +72,7 @@ static void *str_alloc(void)
}
if((p = memory_pool_alloc(mp[i]))) {
- return p;
+ if(p != NULL) return p;
}
}
return NULL; /* out of memory pools */