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 --- driver.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'driver.c') diff --git a/driver.c b/driver.c index 888dae4d..6cb18cd8 100644 --- a/driver.c +++ b/driver.c @@ -838,8 +838,12 @@ struct method *proto; /* protocol method table */ /* we may need to get sizes in order to check message limits */ msgsizes = (int *)NULL; if (!ctl->fetchall && proto->getsizes && ctl->limit) - if ((msgsizes = (proto->getsizes)(socket, count)) == (int *)NULL) + { + msgsizes = (int *)alloca(sizeof(int) * count); + + if ((ok = (proto->getsizes)(socket, count, msgsizes)) != 0) return(PS_ERROR); + } if (check_only) { -- cgit v1.2.3