]> git.ozlabs.org Git - petitboot/blobdiff - discover/resource.c
discover/grub2: Ignore sign-compare warning for generated code
[petitboot] / discover / resource.c
index 25fff650db7fabc6bfe805525c38c379a3ce7708..04e14cb42c634567a5d99f3cbab226d5055139d0 100644 (file)
@@ -1,5 +1,7 @@
 
-#define _GNU_SOURCE
+#if defined(HAVE_CONFIG_H)
+#include "config.h"
+#endif
 
 #include <assert.h>
 #include <stdbool.h>
@@ -122,6 +124,7 @@ struct resource *create_url_resource(struct discover_boot_option *opt,
        struct resource *res;
 
        res = talloc(opt, struct resource);
+       talloc_steal(res, url);
        res->url = url;
        res->resolved = true;