Skip to content

Commit a2ccc1d

Browse files
jmikolaalcaeus
authored andcommitted
PHPC-1687: Always free reply from commit_transaction
1 parent 1d70e1a commit a2ccc1d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/MongoDB/Session.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,9 @@ static PHP_METHOD(Session, commitTransaction)
485485

486486
if (!mongoc_client_session_commit_transaction(intern->client_session, &reply, &error)) {
487487
phongo_throw_exception_from_bson_error_t_and_reply(&error, &reply);
488-
bson_destroy(&reply);
489488
}
489+
490+
bson_destroy(&reply);
490491
} /* }}} */
491492

492493
/* {{{ proto void MongoDB\Driver\Session::abortTransaction(void)

0 commit comments

Comments
 (0)