]> granicus.if.org Git - php/commitdiff
Fix leak when read call fails (see comment in #16635).
authorWez Furlong <wez@php.net>
Sun, 3 Nov 2002 13:22:49 +0000 (13:22 +0000)
committerWez Furlong <wez@php.net>
Sun, 3 Nov 2002 13:22:49 +0000 (13:22 +0000)
ext/dio/dio.c

index 2deccb57e04369cd4130b165ba579527fb619ae6..4337fc6ed937ca8f311c5b4c2f79652a013970f5 100644 (file)
@@ -187,6 +187,7 @@ PHP_FUNCTION(dio_read)
        data = emalloc(bytes + 1);
        res = read(f->fd, data, bytes);
        if (res <= 0) {
+               efree(data);
                RETURN_NULL();
        }