Add missing include
[project/opkg-lede.git] / libopkg / opkg_pathfinder.c
index 6198c0414714469fdadf5682cff5e55c3e7afb77..a53dd8ee9370ebd3b525e56966fc2b25bf0290cc 100644 (file)
@@ -23,6 +23,7 @@
 #endif
 
 #include "includes.h"
+#include "libbb/libbb.h"
 #include "opkg_message.h"
 
 #if defined(HAVE_SSLCURL) || defined(HAVE_OPENSSL)
@@ -37,9 +38,9 @@ static int pathfinder_verify_callback(X509_STORE_CTX *ctx, void *arg)
     const char *hex = "0123456789ABCDEF";
     size_t size = i2d_X509(ctx->cert, NULL);
     unsigned char *keybuf, *iend;
-    iend = keybuf = malloc(size);
+    iend = keybuf = xmalloc(size);
     i2d_X509(ctx->cert, &iend);
-    char *certdata_str = malloc(size * 2 + 1);
+    char *certdata_str = xmalloc(size * 2 + 1);
     unsigned char *cp = keybuf;
     char *certdata_str_i = certdata_str;
     while (cp < iend)