Re: [PHP-DEV] cvs: /php3/functions hg_comm.c From: Andi Gutmans (andi <email protected>)
Date: 09/04/99

Did you commit this fix to PHP 4.0 too? If not, please do so.

Andi

At 10:36 AM 8/26/99 +0000, Uwe Steinmann wrote:
>steinm Thu Aug 26 06:36:06 1999 EDT
>
> Modified files:
> /php3/functions hg_comm.c
> Log:
> fixed memory leak in hw_insdoc and hw_inscoll
>
>
>Index: php3/functions/hg_comm.c
>diff -u php3/functions/hg_comm.c:1.29 php3/functions/hg_comm.c:1.30
>--- php3/functions/hg_comm.c:1.29 Fri Aug 20 08:13:26 1999
>+++ php3/functions/hg_comm.c Thu Aug 26 06:36:05 1999
>@@ -23,7 +23,7 @@
> +----------------------------------------------------------------------+
> */
>
>-/* $Id: hg_comm.c,v 1.29 1999/08/20 12:13:26 steinm Exp $ */
>+/* $Id: hg_comm.c,v 1.30 1999/08/26 10:36:05 steinm Exp $ */
>
> /* #define HW_DEBUG */
>
>@@ -962,7 +962,7 @@
> setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &option,
> sizeof(option));
> #endif /* SUN */
>
>- if (connect(sockfd, (struct sockaddr *) &server_addr,
>sizeof(server_addr)) != 0) {
>+ if (connect(sockfd, (struct sockaddr *) &server_addr,
>sizeof(server_addr)) < 0) {
> HWSOCK_FCLOSE(sockfd);
> return(-3);
> }
>@@ -1732,6 +1732,8 @@
>
> ptr++;
> *new_objectID = *ptr;
>+ efree(retmsg->buf);
>+ efree(retmsg);
> return 0;
> }
>
>@@ -1781,6 +1783,8 @@
>
> ptr++;
> *new_objectID = *ptr;
>+ efree(retmsg->buf);
>+ efree(retmsg);
> return 0;
> }
>
>
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
>For additional commands, e-mail: php-dev-help <email protected>
>To contact the list administrators, e-mail: php-list-admin <email protected>

---
Andi Gutmans <andi <email protected>>
http://www.zend.com/

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>