aboutsummaryrefslogtreecommitdiff
path: root/php/ext/google/protobuf/def.c
diff options
context:
space:
mode:
authorBo Yang <teboring@google.com>2017-12-05 16:44:19 -0800
committerBo Yang <teboring@google.com>2017-12-06 10:38:18 -0800
commit3b7a5f451546888ad96aaa143ef86fea904a03ec (patch)
treeb0ed22f963a6caaf360424bcdf14f078f051d312 /php/ext/google/protobuf/def.c
parent7d3437152ad420d4382b883f0a52a86526166ef5 (diff)
downloadprotobuf-3b7a5f451546888ad96aaa143ef86fea904a03ec.tar.gz
protobuf-3b7a5f451546888ad96aaa143ef86fea904a03ec.tar.bz2
protobuf-3b7a5f451546888ad96aaa143ef86fea904a03ec.zip
Fix several more memory leak
Diffstat (limited to 'php/ext/google/protobuf/def.c')
-rw-r--r--php/ext/google/protobuf/def.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/php/ext/google/protobuf/def.c b/php/ext/google/protobuf/def.c
index 13f7cdd6..55291e23 100644
--- a/php/ext/google/protobuf/def.c
+++ b/php/ext/google/protobuf/def.c
@@ -249,6 +249,7 @@ PHP_METHOD(Descriptor, getField) {
MAKE_STD_ZVAL(field_hashtable_value);
ZVAL_OBJ(field_hashtable_value, field_descriptor_type->create_object(
field_descriptor_type TSRMLS_CC));
+ Z_DELREF_P(field_hashtable_value);
#else
field_hashtable_value =
field_descriptor_type->create_object(field_descriptor_type TSRMLS_CC);