From: Jeremy Kerr Date: Wed, 6 Nov 2013 08:33:23 +0000 (+0800) Subject: discover: Allocate contexts with talloc_zero X-Git-Tag: v1.0.0~369 X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=commitdiff_plain;h=1cb9c56d6453bca28cacb5ab3fc134bb151fd6f0;hp=b08de841267546726f452c89cc326a493ec6549c;ds=sidebyside discover: Allocate contexts with talloc_zero Ensure all pointers from the context are NULL. Signed-off-by: Jeremy Kerr --- 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;