diff options
author | Antony Dovgal <tony2001@php.net> | 2007-09-21 13:37:30 +0000 |
---|---|---|
committer | Antony Dovgal <tony2001@php.net> | 2007-09-21 13:37:30 +0000 |
commit | 366c113156f7a04b8c577b32792b045dfb620b57 (patch) | |
tree | 90ed45765444031a89166ac0767fa1cf2a0d625c /ext/iconv | |
parent | 9ee4848c3f610d6a0962f79cb6cb271e292a5c54 (diff) | |
download | php-git-366c113156f7a04b8c577b32792b045dfb620b57.tar.gz |
MFH: plug leak on error (coverity issue #407)
Diffstat (limited to 'ext/iconv')
-rw-r--r-- | ext/iconv/iconv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 2aca0b5cc0..2da0cd7998 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -851,6 +851,9 @@ static php_iconv_err_t _php_iconv_strpos(unsigned int *pretval, cd = iconv_open(GENERIC_SUPERSET_NAME, enc); if (cd == (iconv_t)(-1)) { + if (ndl_buf != NULL) { + efree(ndl_buf); + } #if ICONV_SUPPORTS_ERRNO if (errno == EINVAL) { return PHP_ICONV_ERR_WRONG_CHARSET; |