]> git.ozlabs.org Git - petitboot/commitdiff
discover: Don't free URL in load_url
authorJeremy Kerr <jk@ozlabs.org>
Thu, 18 Jul 2013 05:21:37 +0000 (13:21 +0800)
committerGeoff Levand <geoff@infradead.org>
Tue, 23 Jul 2013 16:44:45 +0000 (09:44 -0700)
Previously, load_url took a char * argument, from which it parsed a
newly allocated URL, and freed the URL before returning.

Commit 5be946c changed load_url (then load_file) to accept a parsed URL
instead of a char *, but didn't remove the free. Any URLs passed to
load_url are currently being unintionally free()ed.

This change removes the invalid free.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/paths.c

index d95e359e9f170b6a69e925a9002bdbe512818ec3..26fb7cb739d7e848591a864c76462178c5012e1b 100644 (file)
@@ -302,6 +302,5 @@ char *load_url(void *ctx, struct pb_url *url, unsigned int *tempfile)
        if (tempfile)
                *tempfile = tmp;
 
        if (tempfile)
                *tempfile = tmp;
 
-       talloc_free(url);
        return local;
 }
        return local;
 }