From 07fe841363cd44eb695eaab0c26c1ef93162b40b Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Thu, 12 Apr 2018 11:45:38 -0600 Subject: [PATCH 1/1] dtfile/FileDialog: CID 175220 --- cde/programs/dtfile/FileDialog.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cde/programs/dtfile/FileDialog.c b/cde/programs/dtfile/FileDialog.c index a3e472d0..743bfac0 100644 --- a/cde/programs/dtfile/FileDialog.c +++ b/cde/programs/dtfile/FileDialog.c @@ -1953,7 +1953,7 @@ ShowMakeFileDialog( DialogCallbackStruct * call_struct; char * tmpStr = NULL, *tempStr = NULL; - XmString label_string; + XmString label_string = NULL; Arg args[20]; int n; @@ -2044,6 +2044,14 @@ ShowMakeFileDialog( } XtFree(tempStr); + if (!shell) + { + /* shouldn't happen, but... */ + if (label_string) + XmStringFree(label_string); + return; + } + /* Set the useAsyncGeo on the shell */ XtSetArg (args[0], XmNuseAsyncGeometry, True); XtSetValues (XtParent(shell), args, 1); -- 2.25.1