mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-10-03 15:29:29 +00:00
Fix memory leak during do_staging()
Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
This commit is contained in:
committed by
Otavio Pontes
parent
956822ad78
commit
950478729d
@@ -140,6 +140,7 @@ enum swupd_code do_staging(struct file *file, struct manifest *MoM)
|
||||
(file->is_file && !S_ISREG(s.st_mode))) {
|
||||
// file type changed, move old out of the way for new
|
||||
ret = sys_rm_recursive(statfile);
|
||||
free_and_clear_pointer(&statfile);
|
||||
if (ret != 0 && ret != -ENOENT) {
|
||||
ret = SWUPD_COULDNT_REMOVE_FILE;
|
||||
goto out;
|
||||
|
||||
Reference in New Issue
Block a user