From: Sunil S. <sh...@bo...> - 2005-12-08 11:23:29
|
Hi, This minor patch fixes potential memory and socket leak. The memory leak can occur when multiple folders are being polled. ==================================================================================== Index: fetchmail/driver.c =================================================================== --- fetchmail/driver.c (revision 4523) +++ fetchmail/driver.c (working copy) @@ -1373,7 +1373,8 @@ if (count > INT_MAX/sizeof(int)) { report(stderr, GT_("bogus message count!")); - return(PS_PROTOCOL); + err = PS_PROTOCOL; + goto cleanUp; } /* @@ -1389,6 +1390,7 @@ if (proto->getsizes && !(proto->getpartialsizes && NUM_NONZERO(ctl->fetchsizelimit))) { + xfree(msgsizes); msgsizes = xmalloc(sizeof(int) * count); for (i = 0; i < count; i++) msgsizes[i] = 0; ==================================================================================== -- Sunil Shetye. |