Commit 23efcb5c authored by Shawn Webb's avatar Shawn Webb
Browse files

Use memset_s rather than memset



To ensure that the context gets zeroed.
Signed-off-by: Shawn Webb's avatarShawn Webb <shawn.webb@hardenedbsd.org>
parent e36d93e6
......@@ -22,6 +22,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define __STDC_WANT_LIB_EXT1__ 1
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......@@ -100,7 +102,7 @@ lattzfs_ctx_free(lattzfs_ctx_t **ctx)
}
free(ctxp->lc_pool_name);
memset(ctxp, 0, sizeof(*ctxp));
memset_s(ctxp, sizeof(*ctxp), 0, sizeof(*ctxp));
free(ctxp);
*ctx = NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment