aboutsummaryrefslogtreecommitdiff
path: root/php/ext/google/protobuf/message.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/message.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/message.c')
-rw-r--r--php/ext/google/protobuf/message.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/php/ext/google/protobuf/message.c b/php/ext/google/protobuf/message.c
index 3fce2c17..b11c7215 100644
--- a/php/ext/google/protobuf/message.c
+++ b/php/ext/google/protobuf/message.c
@@ -374,7 +374,7 @@ PHP_METHOD(Message, whichOneof) {
LOWER_FIELD) \
PHP_METHOD(UPPER_CLASS, get##UPPER_FIELD) { \
zval member; \
- PHP_PROTO_ZVAL_STRING(&member, LOWER_FIELD, 1); \
+ PHP_PROTO_ZVAL_STRING(&member, LOWER_FIELD, 0); \
PHP_PROTO_FAKE_SCOPE_BEGIN(LOWER_CLASS##_type); \
zval* value = message_get_property_internal(getThis(), &member TSRMLS_CC); \
PHP_PROTO_FAKE_SCOPE_END; \
@@ -387,7 +387,7 @@ PHP_METHOD(Message, whichOneof) {
return; \
} \
zval member; \
- PHP_PROTO_ZVAL_STRING(&member, LOWER_FIELD, 1); \
+ PHP_PROTO_ZVAL_STRING(&member, LOWER_FIELD, 0); \
message_set_property_internal(getThis(), &member, value TSRMLS_CC); \
PHP_PROTO_RETVAL_ZVAL(getThis()); \
}
@@ -396,7 +396,7 @@ PHP_METHOD(Message, whichOneof) {
LOWER_FIELD) \
PHP_METHOD(UPPER_CLASS, get##UPPER_FIELD) { \
zval member; \
- PHP_PROTO_ZVAL_STRING(&member, LOWER_FIELD, 1); \
+ PHP_PROTO_ZVAL_STRING(&member, LOWER_FIELD, 0); \
PHP_PROTO_FAKE_SCOPE_BEGIN(LOWER_CLASS##_type); \
message_get_oneof_property_internal(getThis(), &member, \
return_value TSRMLS_CC); \
@@ -409,7 +409,7 @@ PHP_METHOD(Message, whichOneof) {
return; \
} \
zval member; \
- PHP_PROTO_ZVAL_STRING(&member, LOWER_FIELD, 1); \
+ PHP_PROTO_ZVAL_STRING(&member, LOWER_FIELD, 0); \
message_set_property_internal(getThis(), &member, value TSRMLS_CC); \
PHP_PROTO_RETVAL_ZVAL(getThis()); \
}