regedit: Don't panic if we can't open the file.
authorAndreas Schneider <asn@samba.org>
Thu, 2 Aug 2012 10:41:49 +0000 (12:41 +0200)
committerMichael Adam <obnox@samba.org>
Mon, 29 Apr 2013 11:06:00 +0000 (13:06 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/utils/regedit.c

index 554c31e08916ca1c0d509a65c9fdd39c8e486990..14215cb77568e03fc89745b0a400921408ca17ff 100644 (file)
@@ -353,7 +353,11 @@ int main(int argc, char **argv)
        /* some simple tests */
 
        rv = reg_open_samba3(frame, &ctx);
-       SMB_ASSERT(W_ERROR_IS_OK(rv));
+       if (!W_ERROR_IS_OK(rv)) {
+               TALLOC_FREE(frame);
+
+               return 1;
+       }
 
        display_test_window(frame, ctx);