From: Peter Howkins Date: Tue, 3 Jul 2018 17:54:16 +0000 (+0100) Subject: dtstyle: Coverity 87251 X-Git-Tag: 2.3.0a~226 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=43a31a81fa4eafb105c76edd052206ef68886bed;p=oweals%2Fcde.git dtstyle: Coverity 87251 --- diff --git a/cde/programs/dtstyle/ColorFile.c b/cde/programs/dtstyle/ColorFile.c index 564ab169..28bc4287 100644 --- a/cde/programs/dtstyle/ColorFile.c +++ b/cde/programs/dtstyle/ColorFile.c @@ -526,7 +526,10 @@ WriteOutDesc( if (hm_pl_DB ) XrmPutFileDatabase(hm_pl_DB, desc_file); /* make the file read, write */ - chmod(desc_file,438); + if(chmod(desc_file,438) == -1) { + fprintf(stderr, "failed to chmod '%s', %s\n", desc_file, strerror(errno)); + } + XtFree(desc_file); XtFree(desc_name);