mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-28 10:30:03 +01:00
[gbsearcharray] Use malloc() instead of realloc(NULL,...)
This commit is contained in:
parent
dfda26d1a9
commit
ba6be2035d
@ -133,7 +133,7 @@ g_bsearch_array_create (const GBSearchConfig *bconfig)
|
||||
size = sizeof (GBSearchArray) + bconfig->sizeof_node;
|
||||
if (bconfig->flags & G_BSEARCH_ARRAY_ALIGN_POWER2)
|
||||
size = G_BSEARCH_UPPER_POWER2 (size);
|
||||
barray = (GBSearchArray *) g_realloc (NULL, size);
|
||||
barray = (GBSearchArray *) g_malloc (size);
|
||||
memset (barray, 0, sizeof (GBSearchArray));
|
||||
|
||||
return barray;
|
||||
|
Loading…
x
Reference in New Issue
Block a user