From 09641e343247c906e082179da3ab92eeed780c51 Mon Sep 17 00:00:00 2001 From: xiongchangwu Date: Tue, 8 Apr 2025 21:11:23 +0800 Subject: [PATCH] fclose Signed-off-by: xiongchangwu --- adapter/uhdf2/security/src/hdf_security.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/adapter/uhdf2/security/src/hdf_security.c b/adapter/uhdf2/security/src/hdf_security.c index 32bfa2aac..d26ccaccb 100644 --- a/adapter/uhdf2/security/src/hdf_security.c +++ b/adapter/uhdf2/security/src/hdf_security.c @@ -161,10 +161,10 @@ static int32_t HdfUpdateSecurityId(const char *id, uint64_t perms, int32_t isSet HDF_LOGE("open %{public}s failed, errno is %{public}d", HDF_SECURE_PATH, errno); return HDF_FAILURE; } - int32_t fd = fileno(file); + int32_t fd = fileno(fp); if (fd < 0) { HDF_LOGE("fileno %{public}s failed, errno is %{public}d", HDF_SECURE_PATH, errno); - (void)fclose(file); + (void)fclose(fp); return HDF_FAILURE; } @@ -176,7 +176,7 @@ static int32_t HdfUpdateSecurityId(const char *id, uint64_t perms, int32_t isSet ret = ioctl(fd, HDF_SECURE_DELETE_INFO, &secInfo); } - (void)fclose(file); + (void)fclose(fp); fd = -1; if (ret != 0) { HDF_LOGE("%{public}s ioctl error, ret is %{public}d", __FUNCTION__, ret); -- Gitee