diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-11-06 16:33:23 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-11-06 16:34:26 +0800 |
commit | 1cb9c56d6453bca28cacb5ab3fc134bb151fd6f0 (patch) | |
tree | 83ae2881747a5d318ac711d467beec11226accca | |
parent | b08de841267546726f452c89cc326a493ec6549c (diff) | |
download | talos-petitboot-1cb9c56d6453bca28cacb5ab3fc134bb151fd6f0.tar.gz talos-petitboot-1cb9c56d6453bca28cacb5ab3fc134bb151fd6f0.zip |
discover: Allocate contexts with talloc_zero
Ensure all pointers from the context are NULL.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r-- | discover/device-handler.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c index 43bcd9f..a497147 100644 --- a/discover/device-handler.c +++ b/discover/device-handler.c @@ -524,10 +524,8 @@ struct discover_context *device_handler_discover_context_create( { struct discover_context *ctx; - ctx = talloc(handler, struct discover_context); + ctx = talloc_zero(handler, struct discover_context); ctx->device = device; - ctx->conf_url = NULL; - ctx->test_data = NULL; list_init(&ctx->boot_options); return ctx; |