Author: jelmer Date: 2007-08-27 21:24:44 +0000 (Mon, 27 Aug 2007) New Revision: 24725
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24725 Log: Don't segfault if hive file can't be found Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/registry/tools/regshell.c Changeset: Property changes on: branches/SAMBA_4_0 ___________________________________________________________________ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/registry/tools/regshell.c =================================================================== --- branches/SAMBA_4_0/source/lib/registry/tools/regshell.c 2007-08-27 21:19:34 UTC (rev 24724) +++ branches/SAMBA_4_0/source/lib/registry/tools/regshell.c 2007-08-27 21:24:44 UTC (rev 24725) @@ -481,6 +481,8 @@ 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 {