From 1d9c45b9a0b2d097b8e33d97291be91cc1a9fe14 Mon Sep 17 00:00:00 2001 From: linqiheng Date: Thu, 12 Jan 2023 13:23:48 +0000 Subject: [PATCH] hmdfs: fix double free of sbi->local_dst Signed-off-by: linqiheng --- fs/hmdfs/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/hmdfs/main.c b/fs/hmdfs/main.c index d0a41061bb2f..d72eb60b62d5 100644 --- a/fs/hmdfs/main.c +++ b/fs/hmdfs/main.c @@ -762,6 +762,7 @@ static int hmdfs_update_dst(struct hmdfs_sb_info *sbi) goto out_err; } kfree(sbi->local_dst); + sbi->local_dst = NULL; len = strlen(sbi->real_dst) + strlen(path_local) + 1; if (len > PATH_MAX) { -- Gitee