Skip to content

Commit 0bfc37b

Browse files
Add description for dst parameter of bson_value_copy (#1874)
`dst` should be uninitialized to prevent memory leak Signed-off-by: linraymond2006 <[email protected]>
1 parent 8422cad commit 0bfc37b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libbson/doc/bson_value_copy.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Description
2121
-----------
2222

2323
This function will copy the boxed content in ``src`` into ``dst``. ``dst`` must be freed with :symbol:`bson_value_destroy()` when no longer in use.
24+
``dst`` *MUST* be an uninitialized :symbol:`bson_value_t` to avoid leaking memory.
2425

2526
.. note::
2627

0 commit comments

Comments
 (0)