mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 07:38:54 +02:00
[gbsearcharray] Use malloc() instead of realloc(NULL,...)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user