mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-26 00:09:41 +03:00
Hashmap: Check for failure of first malloc.
This commit is contained in:
parent
3cceb8ff2b
commit
a59646cbf8
@ -67,6 +67,9 @@ hashmap_t *
|
||||
hashmap_create(hashmap_parameters_t *params)
|
||||
{
|
||||
hashmap_t *ret = malloc(sizeof(hashmap_t));
|
||||
if (ret == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ret->params = params;
|
||||
ret->bucket_count = DEFAULT_HASHMAP_BUCKETS;
|
||||
|
Loading…
Reference in New Issue
Block a user