aboutsummaryrefslogtreecommitdiffhomepage
path: root/php/ext/google/protobuf/type_check.c
diff options
context:
space:
mode:
authorGravatar Bo Yang <teboring@google.com>2017-12-05 16:44:19 -0800
committerGravatar Bo Yang <teboring@google.com>2017-12-06 10:38:18 -0800
commit3b7a5f451546888ad96aaa143ef86fea904a03ec (patch)
treeb0ed22f963a6caaf360424bcdf14f078f051d312 /php/ext/google/protobuf/type_check.c
parent7d3437152ad420d4382b883f0a52a86526166ef5 (diff)
Fix several more memory leak
Diffstat (limited to 'php/ext/google/protobuf/type_check.c')
-rw-r--r--php/ext/google/protobuf/type_check.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/php/ext/google/protobuf/type_check.c b/php/ext/google/protobuf/type_check.c
index 37171426..85f5051e 100644
--- a/php/ext/google/protobuf/type_check.c
+++ b/php/ext/google/protobuf/type_check.c
@@ -532,6 +532,7 @@ void check_map_field(const zend_class_entry* klass, PHP_PROTO_LONG key_type,
map_field_handlers->write_dimension(
CACHED_TO_ZVAL_PTR(map_field), &key,
CACHED_PTR_TO_ZVAL_PTR((CACHED_VALUE*)value) TSRMLS_CC);
+ zval_dtor(&key);
}
RETURN_ZVAL(CACHED_TO_ZVAL_PTR(map_field), 1, 1);