Skip to content

Commit 730fdc7

Browse files
committed
Fix memory leak in php_imap_mutf7()
We have to free the string which has been allocated by libc-client.
1 parent 81b2f3e commit 730fdc7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/imap/php_imap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3074,7 +3074,8 @@ static void php_imap_mutf7(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
30743074
if (out == NIL) {
30753075
RETURN_FALSE;
30763076
} else {
3077-
RETURN_STRING((char *)out);
3077+
RETVAL_STRING((char *)out);
3078+
fs_give((void**) &out);
30783079
}
30793080
}
30803081
/* }}} */

0 commit comments

Comments
 (0)