From 09f0b16cf35a1d8ed8c810f32c79bdb8f4258538 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Wed, 11 Apr 2012 15:37:12 +0100 Subject: [PATCH] Fix segfault on file not copyright file not found. Only fclose() a file handle that has been successfully fopen()ed. --- cde/programs/dtlogin/vgmain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cde/programs/dtlogin/vgmain.c b/cde/programs/dtlogin/vgmain.c index 5472a7ea..edb2feee 100644 --- a/cde/programs/dtlogin/vgmain.c +++ b/cde/programs/dtlogin/vgmain.c @@ -1272,9 +1272,9 @@ MakeDialog( DialogType dtype ) XmStringCreate(buffer, XmFONTLIST_DEFAULT_TAG)); } + fclose(fp); } - fclose(fp); XtSetArg(argt[i], XmNmessageString, xmstr ); i++; w = XmCreateInformationDialog(table, "copyright_msg", argt, i); -- 2.25.1