unlink(maskFile);
}
if ( (IconDataList[i]->bmDirtyBit) &&
- (IconDataList[i]->bmFileName) &&
(strlen(IconDataList[i]->bmFileName)) ) {
#ifdef DEBUG
printf("RemoveTmpIconFiles: unlink '%s'\n", IconDataList[i]->bmFileName); /* debug */
if (tmp) {
tmp1 = strstr(tmp, "};");
}
- sprintf(tmpbuf, "%s_m", tmpIconFile);
+ snprintf(tmpbuf, sizeof(tmpbuf), "%s_m", tmpIconFile);
if (tmp1) {
tmp1 += 2; /* Go one char past the ";" */
#ifdef DEBUG
display_error_message(XtParent(wid), errPtr);
XtFree(errPtr);
XtFree(mname);
+ if (fd1 > -1) close(fd1);
return;
} else {
/***************************************/
XtFree(errPtr);
if (mname) XtFree(mname);
XtFree((char *) buffer);
+ if (fd1 > -1) close(fd1);
+ if (fd2 > -1) close(fd2);
return;
}
if (lenFile2) {
XtFree(errPtr);
XtFree((char *) buffer);
if (mname) XtFree(mname);
+ if (fd1 > -1) close(fd1);
+ if (fd2 > -1) close(fd2);
return;
}
}
- if (fd1 > -1) close(fd1);
- if (fd2 > -1) close(fd2);
+ if (fd1 > -1) close(fd1); fd1 = -1;
+ if (fd2 > -1) close(fd2); fd2 = -1;
#ifdef DEBUG
printf("final buffer = '%s'\n", buffer); /* debug */
TurnOnHourGlassAllWindows();
ttRc = tt_message_send( m );
DieFromToolTalkError( UxTopLevel, "tt_message_send", ttRc );
+
+ if (fd1 > -1) close(fd1);
+ if (fd2 > -1) close(fd2);
}
#endif /* __TOOLTALK */