summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-06-26 13:37:46 +0200
committerMichael Adam <obnox@samba.org>2012-06-26 19:57:19 +0200
commitc55a6dae655716539edd3e4dd8b4d61e22f1858e (patch)
tree97c3f8ec6b3aa0715c9519c67466605b164ae92c /source3
parent20e5e8ef266709378b239f0338a3ecb2d175e5a4 (diff)
downloadsamba-c55a6dae655716539edd3e4dd8b4d61e22f1858e.tar.gz
samba-c55a6dae655716539edd3e4dd8b4d61e22f1858e.tar.bz2
samba-c55a6dae655716539edd3e4dd8b4d61e22f1858e.zip
s3:net registry import: untangle nested function calls
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_registry.c11
1 files changed, 8 insertions, 3 deletions
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);