From 5975bb8822a24e6ab5a9a59ab1d6441321c7693d Mon Sep 17 00:00:00 2001 From: Rafal Stefanowski Date: Thu, 13 Jun 2024 11:39:34 +0200 Subject: [PATCH] Fix env memory zeroing Signed-off-by: Rafal Stefanowski --- env/posix/ocf_env.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/env/posix/ocf_env.h b/env/posix/ocf_env.h index a1113c73..9220d1ea 100644 --- a/env/posix/ocf_env.h +++ b/env/posix/ocf_env.h @@ -1,6 +1,6 @@ /* * Copyright(c) 2019-2022 Intel Corporation - * Copyright(c) 2023 Huawei Technologies + * Copyright(c) 2023-2024 Huawei Technologies * SPDX-License-Identifier: BSD-3-Clause */ @@ -187,7 +187,7 @@ static inline void env_secure_free(const void *ptr, size_t size) { if (ptr) { #if SECURE_MEMORY_HANDLING - memset(ptr, size, 0); + memset(ptr, 0, size); /* TODO: flush CPU caches ? */ ENV_BUG_ON(munlock(ptr)); #endif