From 92e9c825b48fc8d6d5383f7438c848fc5f8329ca Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 3 Nov 2002 13:22:49 +0000 Subject: [PATCH] Fix leak when read call fails (see comment in #16635). --- ext/dio/dio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/dio/dio.c b/ext/dio/dio.c index 2deccb57e0..4337fc6ed9 100644 --- a/ext/dio/dio.c +++ b/ext/dio/dio.c @@ -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(); } -- 2.50.1