Skip to content

Commit 8c4ddfd

Browse files
committed
Merge pull request #11 from JordyMoos/exception-memory-leak-fix
Destruct the error when you are done with it
2 parents c38ff4d + f0d1264 commit 8c4ddfd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bucket.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ void bopcookie_error(const bopcookie *cookie, bucket_object *data, zval *doc,
6161
zval *zerror = create_lcb_exception(error TSRMLS_CC);
6262
if (Z_TYPE_P(cookie->retval) == IS_ARRAY) {
6363
metadoc_from_error(doc, zerror TSRMLS_CC);
64+
zval_ptr_dtor(&zerror);
6465
} else {
6566
data->error = zerror;
6667
}

0 commit comments

Comments
 (0)