tools: fix memory leakage issue in acrnlog.c

In function mk_dir(), handler 'dir' returned
 by opendir() is not released before function
 return and results in memory leakage.

Tracked-On: #7098
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
Yonghua Huang 2022-02-10 07:18:59 +03:00 committed by acrnsi-robot
parent 13ce55ef4f
commit 9699353a08
1 changed files with 1 additions and 0 deletions

View File

@ -414,6 +414,7 @@ static int mk_dir(const char *path)
} else
remove(acrnlog_file);
}
closedir(dir);
}
return 0;