From d59e69783b91feb5d3ee5d2ba802c279ecf021c5 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 26 Oct 1996 13:21:21 +0000 Subject: Include mx.h, fix a memory leak. svn path=/trunk/; revision=395 --- pop3.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'pop3.c') 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; -- cgit v1.2.3