dtstyle: Fix CID 100252
authorPeter Howkins <flibble@users.sf.net>
Tue, 13 Jan 2015 10:13:03 +0000 (10:13 +0000)
committerPeter Howkins <flibble@users.sf.net>
Tue, 13 Jan 2015 10:13:03 +0000 (10:13 +0000)
cde/programs/dtstyle/ColorFile.c

index 6f5e124b76699562540d0d761680cf608c582381..9e9042ed63b36ff4c34148a8511c14386551b633 100644 (file)
@@ -485,6 +485,8 @@ WriteOutPalette(
                                    pCurrentPalette->color[i].bg.blue);
            if(-1 == write(fd, temp, strlen(temp))) {
                   perror(strerror(errno));
+                  XtFree(temp);
+                  close(fd);
                   return(-1);
           }
        }