opkg: adding the hash_table_remove API, not using yet.
[oweals/opkg-lede.git] / libopkg / pkg_dest_list.c
index 023e58e404b4908c047e29acbda6b97114c53eef..48ca07fa771f3dd64cb9877522e06de3a149b0cd 100644 (file)
@@ -1,4 +1,4 @@
-/* pkg_dest_list.c - the itsy package management system
+/* pkg_dest_list.c - the opkg package management system
 
    Carl D. Worth
 
@@ -15,7 +15,7 @@
    General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 
 #include "pkg_dest.h"
 #include "void_list.h"
@@ -59,7 +59,7 @@ pkg_dest_t *pkg_dest_list_append(pkg_dest_list_t *list, const char *name,
     pkg_dest_t *pkg_dest;
 
     /* freed in plg_dest_list_deinit */
-    pkg_dest = malloc(sizeof(pkg_dest_t));
+    pkg_dest = calloc(1, sizeof(pkg_dest_t));
     if (pkg_dest == NULL) {
        fprintf(stderr, "%s: out of memory\n", __FUNCTION__);
        return NULL;