X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pqtypes.c;fp=src%2Fphp_pqtypes.c;h=e5733da650d748a76a0b39336ea85ab2eda78f0a;hp=e0daddecbb804670e82f9eb987fe160c31add956;hb=a04c77181328660f1ca748cb82a20abe43cebb65;hpb=6e672843c6d37b9d84f632f173d6bdf8025564b2 diff --git a/src/php_pqtypes.c b/src/php_pqtypes.c index e0dadde..e5733da 100644 --- a/src/php_pqtypes.c +++ b/src/php_pqtypes.c @@ -136,6 +136,7 @@ static int php_pqtypes_object_has_dimension(zval *object, zval *member, int chec return Z_TYPE_PP(data) != IS_NULL; } efree(key_str); + key_str = NULL; } else { if (SUCCESS == zend_hash_index_find(&obj->intern->types, index, (void *) &data)) { return Z_TYPE_PP(data) != IS_NULL; @@ -172,9 +173,10 @@ static zval *php_pqtypes_object_read_dimension(zval *object, zval *member, int t return *data; } } - if (key_str) { - efree(key_str); - } + } + + if (key_str) { + efree(key_str); } return NULL;