[gbsearcharray] Use malloc() instead of realloc(NULL,...)
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 6 Jun 2009 03:24:28 +0000 (23:24 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 20 Jul 2009 20:03:25 +0000 (16:03 -0400)
glib/gbsearcharray.h

index 8e68758936be6d0d5037379d0a63784a089a2d55..1ad893c4ac3c508c217c3d5f2e6e83108a54b8ba 100644 (file)
@@ -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;