Skip to content

Commit 8f04469

Browse files
committed
fix memory leak in encoding of geo search queries
Change-Id: I9145115dd29c0205f10e691e50a24d615cc19504 Reviewed-on: http://review.couchbase.org/c/php-couchbase/+/163454 Tested-by: Build Bot <[email protected]> Reviewed-by: Sergey Avseyev <[email protected]>
1 parent 5b10e86 commit 8f04469

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

src/couchbase/search/geo_bounding_box_query.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ PHP_METHOD(GeoBoundingBoxSearchQuery, jsonSerialize)
8989
prop = pcbc_read_property(pcbc_geo_bounding_box_search_query_ce, getThis(), ("top_left_latitude"), 0, &ret);
9090
add_next_index_zval(&top_left, prop);
9191
add_assoc_zval(return_value, "top_left", &top_left);
92-
Z_TRY_ADDREF(top_left);
9392

9493
zval bottom_right;
9594
array_init(&bottom_right);
@@ -98,7 +97,6 @@ PHP_METHOD(GeoBoundingBoxSearchQuery, jsonSerialize)
9897
prop = pcbc_read_property(pcbc_geo_bounding_box_search_query_ce, getThis(), ("bottom_right_latitude"), 0, &ret);
9998
add_next_index_zval(&bottom_right, prop);
10099
add_assoc_zval(return_value, "bottom_right", &bottom_right);
101-
Z_TRY_ADDREF(bottom_right);
102100

103101
prop = pcbc_read_property(pcbc_geo_bounding_box_search_query_ce, getThis(), ("field"), 0, &ret);
104102
if (Z_TYPE_P(prop) != IS_NULL) {

src/couchbase/search/geo_distance_query.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ PHP_METHOD(GeoDistanceSearchQuery, jsonSerialize)
9090
prop = pcbc_read_property(pcbc_geo_distance_search_query_ce, getThis(), ("latitude"), 0, &ret);
9191
add_next_index_zval(&location, prop);
9292
add_assoc_zval(return_value, "location", &location);
93-
Z_TRY_ADDREF(location);
9493

9594
prop = pcbc_read_property(pcbc_geo_distance_search_query_ce, getThis(), ("distance"), 0, &ret);
9695
if (Z_TYPE_P(prop) != IS_NULL) {

0 commit comments

Comments
 (0)