From 2cd9215e777820eec2cd6952aaa80c594facba32 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 27 Aug 2007 21:24:44 +0000 Subject: r24725: Don't segfault if hive file can't be found (This used to be commit 2daa8fa88dbc80a7c54c4b489b1037658d95755c) --- source4/lib/registry/tools/regshell.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source4/lib') 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 { -- cgit