cvs: /php3/functions hg_comm.c hw.c

From: Date: Fri, 20 Aug 1999 12:13:27 +0000
Subject: cvs: /php3/functions hg_comm.c hw.c
Groups: php.dev 
Request: Send a blank email to php-dev+get-10023@lists.php.net to get a copy of this message
steinm Fri Aug 20 08:13:27 1999 EDT Modified files: /php3/functions hg_comm.c hw.c Log: fixed memory leak in hw_srcbydestobj Index: php3/functions/hg_comm.c diff -u php3/functions/hg_comm.c:1.28 php3/functions/hg_comm.c:1.29 --- php3/functions/hg_comm.c:1.28 Fri Aug 6 02:37:31 1999 +++ php3/functions/hg_comm.c Fri Aug 20 08:13:26 1999 @@ -23,7 +23,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hg_comm.c,v 1.28 1999/08/06 06:37:31 steinm Exp $ */ +/* $Id: hg_comm.c,v 1.29 1999/08/20 12:13:26 steinm Exp $ */ /* #define HW_DEBUG */ @@ -4627,6 +4627,7 @@ if ( (msg.buf = (char *)emalloc(length-HEADER_LENGTH)) == NULL ) { /* perror("send_command"); */ + efree(childIDs); lowerror = LE_MALLOC; return(-1); } @@ -4635,11 +4636,13 @@ if ( send_hg_msg(sockfd, &msg, length) == -1 ) { efree(msg.buf); + efree(childIDs); return(-1); } efree(msg.buf); } + efree(childIDs); if(NULL == (objptr = (char **) emalloc(*count * sizeof(hw_objrec *)))) { /* if emalloc fails, get at least all remaining messages from server */ Index: php3/functions/hw.c diff -u php3/functions/hw.c:1.45 php3/functions/hw.c:1.46 --- php3/functions/hw.c:1.45 Fri Aug 6 02:37:31 1999 +++ php3/functions/hw.c Fri Aug 20 08:13:26 1999 @@ -23,7 +23,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hw.c,v 1.45 1999/08/06 06:37:31 steinm Exp $ */ +/* $Id: hw.c,v 1.46 1999/08/20 12:13:26 steinm Exp $ */ #if COMPILE_DL #include "dl/phpdl.h" @@ -1727,6 +1727,7 @@ } if(getParametersArray(src_arr, _php3_hash_num_elements(src_arr), objvIDs) == FAILURE) { + efree(objvIDs); RETURN_FALSE; }

« previous php.dev (#10023) next »