diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-10-26 13:21:21 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-10-26 13:21:21 +0000 |
commit | d59e69783b91feb5d3ee5d2ba802c279ecf021c5 (patch) | |
tree | 3757e936897981afc9136dd3cff7cf8981a3d89a /pop3.c | |
parent | e700d27f62f10357b82737d8086982b31f5aa652 (diff) | |
download | fetchmail-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.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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; |