s/strdup/xstrdup/ - check memory allocations for failure.
[oweals/opkg-lede.git] / libopkg / pkg_parse.c
index a588e180eba67cbea2e4305a68b9645cf2d6e37b..5389479a9c6c434be734db879d3b20c6e23fbf38 100644 (file)
@@ -22,6 +22,7 @@
 #include "pkg.h"
 #include "opkg_utils.h"
 #include "pkg_parse.h"
+#include "libbb/libbb.h"
 
 int isGenericFieldType(char * type, char * line)
 {
@@ -378,7 +379,7 @@ out:;
     {
        pkg->provides_count = 1;
        pkg->provides_str = calloc (1, sizeof (char*));
-       pkg->provides_str[0] = strdup ("opkg_internal_use_only");
+       pkg->provides_str[0] = xstrdup("opkg_internal_use_only");
     }
 
     if (pkg->name) {