discover/resource: create_url_resource should take ownership of url
[petitboot] / discover / resource.c
index 25fff650db7fabc6bfe805525c38c379a3ce7708..f9019d1408eed5556b100140bd9c86437858e7b4 100644 (file)
@@ -122,6 +122,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;