From 8e4b6605bfb1e896792690453e5ab7a3fff26118 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Thu, 12 Apr 2018 11:21:06 -0600 Subject: [PATCH] dtfile/dtcopy/sharedFuncs: CID 175225 --- cde/programs/dtfile/dtcopy/sharedFuncs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cde/programs/dtfile/dtcopy/sharedFuncs.c b/cde/programs/dtfile/dtcopy/sharedFuncs.c index eb4e31ec..10bd50de 100644 --- a/cde/programs/dtfile/dtcopy/sharedFuncs.c +++ b/cde/programs/dtfile/dtcopy/sharedFuncs.c @@ -550,7 +550,7 @@ CheckDeleteAccess( char title[200],*msg,*tmpmsg; char *tmpstring = strdup(source_name),*tmpptr; XEvent event; - int perm_status; + int perm_status = 0; delay = 10000; tmpptr = strrchr(tmpstring,'/'); @@ -567,13 +567,15 @@ CheckDeleteAccess( } perm_status = CopyCheckDeletePermission(tmpptr,source_name); free(tmpstring); + tmpstring = NULL; } if(!perm_status) /* Everything is fine just return */ { - free(tmpstring); return; } + free(tmpstring); + strcpy(title,GETMESSAGE(4,7,"Object Trash - Error")); tmpmsg = GETMESSAGE(4,8,"You do not have permission to put the object \n\n%s\n\ninto trash.\n\nUse the Change Permissions choice from the object's\npopup menu or from the Selected menu to turn on your\nRead permission on the object.\n\nNote: If this object is a folder, you must also have\nRead permission for each of the objects inside the\nfolder before you can put the folder in the trash."); @@ -592,8 +594,6 @@ CheckDeleteAccess( XtAppNextEvent(app_context, &event); XtDispatchEvent(&event); } - - free(tmpstring); } } -- 2.25.1