]> granicus.if.org Git - php/commitdiff
- MFH: Fixed memory leak (patch by Christian Weiske)
authorFelipe Pena <felipe@php.net>
Sun, 10 May 2009 01:07:01 +0000 (01:07 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 10 May 2009 01:07:01 +0000 (01:07 +0000)
ext/sockets/sockets.c

index 4b4c45f6a6f3102f9e86561c01529eebba988979..f17a4f7af1bbcf9b373bd1d34ef439d8c2fa84c1 100644 (file)
@@ -1418,6 +1418,7 @@ PHP_FUNCTION(socket_recvfrom)
                        sin.sin_family = AF_INET;
 
                        if (arg6 == NULL) {
+                               efree(recv_buf);
                                WRONG_PARAM_COUNT;
                        }
 
@@ -1446,6 +1447,7 @@ PHP_FUNCTION(socket_recvfrom)
                        sin6.sin6_family = AF_INET6;
 
                        if (arg6 == NULL) {
+                               efree(recv_buf);
                                WRONG_PARAM_COUNT;
                        }