diff options
author | xujing <xujing125@huawei.com> | 2022-11-28 11:10:19 +0800 |
---|---|---|
committer | Michal Domonkos <mdomonko@redhat.com> | 2023-03-13 15:32:25 +0100 |
commit | d1d6eb987f9e8294ecd5c166f71eea16a048403e (patch) | |
tree | 763b6be216b51e926b5349d52c803f69c11edc78 | |
parent | 0557b0f9a564c2af227f6cb7c357e46db5b73821 (diff) | |
download | rpm-d1d6eb987f9e8294ecd5c166f71eea16a048403e.tar.gz |
Fix memleak when fsmRename failed in fsmCommit
The "dest" is alloced in fsmFsPath but not freed when fsmRename failed
in fsmCommit. Fix it.
(cherry picked from commit 688c4ad34d197055eb8f58fb4e45065af881598c)
-rw-r--r-- | lib/fsm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -782,7 +782,8 @@ static int fsmCommit(int dirfd, char **path, rpmfi fi, rpmFileAction action, con } free(*path); *path = dest; - } + } else + free(dest); } } |