bionic: add missing NULL check from memory allocation on record_backtrace()

Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>

Change-Id: I739c63c5a7344fff1775580044dc647edf246ebf
This commit is contained in:
André Goddard Rosa
2010-02-05 16:03:09 -02:00
committed by Jean-Baptiste Queru
parent c8a850bcd1
commit 5751c54bf1

View File

@@ -323,6 +323,8 @@ static HashEntry* record_backtrace(intptr_t* backtrace, size_t numEntries, size_
} else { } else {
// create a new entry // create a new entry
entry = (HashEntry*)dlmalloc(sizeof(HashEntry) + numEntries*sizeof(intptr_t)); entry = (HashEntry*)dlmalloc(sizeof(HashEntry) + numEntries*sizeof(intptr_t));
if (!entry)
return NULL;
entry->allocations = 1; entry->allocations = 1;
entry->slot = slot; entry->slot = slot;
entry->prev = NULL; entry->prev = NULL;