Skip to content

Commit 9a521a2

Browse files
committed
Merge pull request #49 from fotonauts/mongoc_bulk_operation_execute_without_reply
reply doesn't seem to be required so let's not call bson_init() if it is not set
2 parents 2158b24 + 9954541 commit 9a521a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mongoc/mongoc-bulk-operation.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ mongoc_bulk_operation_execute (mongoc_bulk_operation_t *bulk, /* IN */
287287

288288
bulk->executed = true;
289289

290-
bson_init (reply);
290+
if (reply) {
291+
bson_init (reply);
292+
}
291293

292294
if (!bulk->commands.len) {
293295
bson_set_error (error,

0 commit comments

Comments
 (0)