bson_zero_free man page

bson_zero_free() — This function behaves like bson_free() except that it zeroes the memory first. This can be useful if you are storing passwords or other similarly important data. Note that if it truly is important, you probably want a page protected with mlock() as well to prevent it swapping to disk.

Synopsis

void
bson_zero_free (void  *mem,
                size_t size);

Parameters

mem
A memory region.
size
The size of mem

Description

This function behaves like bson_free(3) except that it zeroes the memory first. This can be useful if you are storing passwords or other similarly important data. Note that if it truly is important, you probably want a page protected with mlock(3) as well to prevent it swapping to disk.

Colophon

This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.

Info

2016‐10‐28 libbson