diff options
author | Antony Dovgal <tony2001@php.net> | 2006-07-27 10:53:15 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2006-07-27 10:53:15 +0000 |
commit | 92f4cc359f810e2c48fbba3a5ae91f4830e2814c (patch) | |
tree | e9cd7611af98eafa98f3f726327114e14ace8599 | |
parent | a98e5c674f268c0e3973bc540cf58f9b5c348a5b (diff) | |
download | php-git-92f4cc359f810e2c48fbba3a5ae91f4830e2814c.tar.gz |
MFH: fix leak in php_local_infile_init() handler
-rw-r--r-- | ext/mysqli/mysqli.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 65300d8682..68368962a9 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -1149,11 +1149,15 @@ void php_local_infile_end(void *ptr) data= (mysqli_local_infile *)ptr; - if (!(mysql = data->userdata)) { + if (!data || !(mysql = data->userdata)) { + if (data) { + free(data); + } return; } php_stream_close(mysql->li_stream); + free(data); return; } /* }}} */ |