From 1cb9c56d6453bca28cacb5ab3fc134bb151fd6f0 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Wed, 6 Nov 2013 16:33:23 +0800 Subject: [PATCH 1/1] discover: Allocate contexts with talloc_zero Ensure all pointers from the context are NULL. Signed-off-by: Jeremy Kerr --- discover/device-handler.c | 4 +--- 1 file changed, 1 insertion(+), 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; -- 2.39.2