aboutsummaryrefslogtreecommitdiffstats
path: root/pop3.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-10-26 13:21:21 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-10-26 13:21:21 +0000
commitd59e69783b91feb5d3ee5d2ba802c279ecf021c5 (patch)
tree3757e936897981afc9136dd3cff7cf8981a3d89a /pop3.c
parente700d27f62f10357b82737d8086982b31f5aa652 (diff)
downloadfetchmail-d59e69783b91feb5d3ee5d2ba802c279ecf021c5.tar.gz
fetchmail-d59e69783b91feb5d3ee5d2ba802c279ecf021c5.tar.bz2
fetchmail-d59e69783b91feb5d3ee5d2ba802c279ecf021c5.zip
Include mx.h, fix a memory leak.
svn path=/trunk/; revision=395
Diffstat (limited to 'pop3.c')
-rw-r--r--pop3.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/pop3.c b/pop3.c
index 5287afd0..a52838af 100644
--- a/pop3.c
+++ b/pop3.c
@@ -186,17 +186,16 @@ int *countp, *newp;
return(0);
}
-static int *pop3_getsizes(socket, count)
+static int pop3_getsizes(socket, count, sizes)
/* capture the sizes of all messages */
int socket;
int count;
+int *sizes;
{
- int ok, *sizes;
+ int ok;
if ((ok = gen_transact(socket, "LIST")) != 0)
- return((int *)NULL);
- else if ((sizes = (int *)malloc(sizeof(int) * count)) == (int *)NULL)
- return((int *)NULL);
+ return(ok);
else
{
char buf [POPBUFSIZE+1];
@@ -215,12 +214,12 @@ int count;
sizes[num - 1] = -1;
}
- return(sizes);
+ return(0);
}
}
static int pop3_is_old(socket, ctl, num)
-/* is the goiven message old? */
+/* is the given message old? */
int socket;
struct query *ctl;
int num;