From 4a87a7ab61ae965cef6a8ffe2d017d1e877cce74 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 2 Aug 2012 12:41:49 +0200 Subject: [PATCH] regedit: Don't panic if we can't open the file. Signed-off-by: Andreas Schneider Reviewed-by: Michael Adam --- source3/utils/regedit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source3/utils/regedit.c b/source3/utils/regedit.c index 554c31e0891..14215cb7756 100644 --- a/source3/utils/regedit.c +++ b/source3/utils/regedit.c @@ -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); -- 2.11.4.GIT