# HG changeset patch # User markus schnalke # Date 1291917582 10800 # Node ID d04894d0fc64a52278d86aa6465cc66a2b30e464 # Parent ca2d11aec2a3c865cdaa1e698765ab6b07f8e0c0 free memory in spool read for continuation header lines see the docs to g_strconcat() about memory allocation diff -r ca2d11aec2a3 -r d04894d0fc64 src/spool.c --- a/src/spool.c Thu Dec 09 13:53:48 2010 -0300 +++ b/src/spool.c Thu Dec 09 14:59:42 2010 -0300 @@ -182,13 +182,16 @@ /* mail headers */ while ((len = read_line(in, buf, MAX_DATALINE)) > 0) { if (strncasecmp(buf, "HD:", 3) == 0) { + DEBUG(6) debugf("spool_read_header(): hdr start\n"); hdr = get_header(&(buf[3])); msg->hdr_list = g_list_append(msg->hdr_list, hdr); } else if ((buf[0] == ' ' || buf[0] == '\t') && hdr) { + DEBUG(6) debugf("spool_read_header(): hdr continuation\n"); char *tmp = hdr->header; /* header continuation */ hdr->header = g_strconcat(hdr->header, buf, NULL); hdr->value = hdr->header + (hdr->value - tmp); + free(tmp); /* because g_strconcat() allocs and copies */ } else { break; }