diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 7c0c3de2d68..ff1192737a6 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1969,7 +1969,7 @@ PHP_FUNCTION(mb_convert_encoding) zend_hash_move_forward(target_hash); i--; } - if ( !strlen(_from_encodings)) { + if (_from_encodings != NULL && !strlen(_from_encodings)) { efree(_from_encodings); _from_encodings = NULL; }