- Allocate buffer large enough to contain UNIX_PATH_MAX size pathnames in case of...
[oweals/gnunet.git] / src / util / container_slist.c
index 10af916c38d4921ed9c70e82ee928ef3c43f12fc..e75c695c51e56a43082245ddcf3d1da252d1106f 100644 (file)
@@ -101,7 +101,7 @@ create_elem (enum GNUNET_CONTAINER_SListDisposition disp, const void *buf,
   }
   else
   {
-    e = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_SList_Elem));
+    e = GNUNET_new (struct GNUNET_CONTAINER_SList_Elem);
     e->elem = (void *) buf;
   }
   e->disp = disp;
@@ -190,7 +190,7 @@ GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst,
 struct GNUNET_CONTAINER_SList *
 GNUNET_CONTAINER_slist_create ()
 {
-  return GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_SList));
+  return GNUNET_new (struct GNUNET_CONTAINER_SList);
 }