summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-27 21:24:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:02:57 -0500
commit2cd9215e777820eec2cd6952aaa80c594facba32 (patch)
tree2e1049608ef76960bfed9200a1816a4857598c26
parent1adedd108cfa656644132c426383b3a40c1bc7a0 (diff)
downloadsamba-2cd9215e777820eec2cd6952aaa80c594facba32.tar.gz
samba-2cd9215e777820eec2cd6952aaa80c594facba32.tar.bz2
samba-2cd9215e777820eec2cd6952aaa80c594facba32.zip
r24725: Don't segfault if hive file can't be found
(This used to be commit 2daa8fa88dbc80a7c54c4b489b1037658d95755c)
-rw-r--r--source4/lib/registry/tools/regshell.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c
index 0887bc91f3..131d76fff5 100644
--- a/source4/lib/registry/tools/regshell.c
+++ b/source4/lib/registry/tools/regshell.c
@@ -481,6 +481,8 @@ int main(int argc, char **argv)
ctx->registry = reg_common_open_remote(remote, cmdline_credentials);
} else if (file != NULL) {
ctx->current = reg_common_open_file(file, cmdline_credentials);
+ if (ctx->current == NULL)
+ return 1;
ctx->registry = ctx->current->context;
ctx->path = talloc_strdup(ctx, "");
} else {