diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-09-26 11:58:11 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-09-26 15:20:59 +0800 |
commit | 58dd7a044cdbbb2deba5c45032f166304bd234ff (patch) | |
tree | 7f1f1155543169aee39549ef668a4c614a3de532 /discover/resource.c | |
parent | 8ad9aba4b4463c9231eb441c81694686443b011a (diff) | |
download | petitboot-58dd7a044cdbbb2deba5c45032f166304bd234ff.zip petitboot-58dd7a044cdbbb2deba5c45032f166304bd234ff.tar.gz |
discover/resource: create_url_resource should take ownership of url
The URL needs to share the lifetime of resource, so talloc_steal it in
create_url_resource.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/resource.c')
-rw-r--r-- | discover/resource.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/discover/resource.c b/discover/resource.c index 25fff65..f9019d1 100644 --- a/discover/resource.c +++ b/discover/resource.c @@ -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; |