From c55a6dae655716539edd3e4dd8b4d61e22f1858e Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 26 Jun 2012 13:37:46 +0200 Subject: s3:net registry import: untangle nested function calls --- source3/utils/net_registry.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'source3/utils') diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c index 5e0e556c22..763ed0d918 100644 --- a/source3/utils/net_registry.c +++ b/source3/utils/net_registry.c @@ -1240,6 +1240,7 @@ static int import_with_precheck_action(const char *import_fname, .setval_type = REGISTRY_VALUE, .data = &import_ctx }; + struct reg_parse_callback *parse_callback; int ret = -1; bool precheck_ok; @@ -1248,9 +1249,13 @@ static int import_with_precheck_action(const char *import_fname, goto done; } - ret = reg_parse_file(import_fname, - reg_import_adapter(frame, import_callback), - parse_options); + parse_callback = reg_import_adapter(frame, import_callback); + if (parse_callback == NULL) { + d_printf("talloc failed\n"); + goto done; + } + + ret = reg_parse_file(import_fname, parse_callback, parse_options); done: talloc_free(frame); -- cgit