More small code/leak fixes

This commit is contained in:
Michiel Broek
2003-12-07 11:54:05 +00:00
parent f7b6706f5a
commit 0bd46be230
5 changed files with 18 additions and 29 deletions

View File

@@ -125,7 +125,9 @@ int postnetmail(FILE *fp, faddr *f, faddr *t, char *orig, char *subject, time_t
}
tidy_faddr(ta);
}
free(msgid);
if (msgid)
free(msgid);
msgid = NULL;
}
if (!strncmp(buf, "\001FMPT", 5)) {
p = strtok(buf, " \n");

View File

@@ -4,7 +4,7 @@
* Purpose ...............: Import a netmail message in the message base.
*
*****************************************************************************
* Copyright (C) 1997-2002
* Copyright (C) 1997-2003
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -133,11 +133,11 @@ int storenet(faddr *f, faddr *t, time_t mdate, int flags, char *Subj, char *msgi
* Set MSGID and REPLY crc.
*/
if (msgid != NULL) {
crc2 = -1;
crc2 = 0xffffffffL;
Msg.MsgIdCRC = upd_crc32(msgid, crc2, strlen(msgid));
}
if (reply != NULL) {
crc2 = -1;
crc2 = 0xffffffffL;
Msg.ReplyCRC = upd_crc32(reply, crc2, strlen(reply));
}