diff options
author | 2016-12-28 21:13:43 -0500 | |
---|---|---|
committer | 2016-12-28 21:13:43 -0500 | |
commit | 5afabfc0042833b548309a918ad84bbdebfefd05 (patch) | |
tree | ca2e938c6e75772e3ff200ee5975235a9c12d8a3 /qtbz2.c | |
parent | tests: ignore emaint failures for non-Gentoo systems (i.e. travis) (diff) | |
download | portage-utils-5afabfc0042833b548309a918ad84bbdebfefd05.tar.gz portage-utils-5afabfc0042833b548309a918ad84bbdebfefd05.tar.bz2 portage-utils-5afabfc0042833b548309a918ad84bbdebfefd05.zip |
qtbz2: fix leakage of dir_fd via the -d option
Diffstat (limited to 'qtbz2.c')
-rw-r--r-- | qtbz2.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -353,9 +353,14 @@ int qtbz2_main(int argc, char **argv) warn("Could not decompose '%s'", tbz2); } + /* We have to cleanup all resources as we're used indirectly + * (e.g. via qmerge). + */ free(heap_tbz2); free(heap_xpak); free(heap_tarbz2); + if (dir_fd != AT_FDCWD) + close(dir_fd); return EXIT_SUCCESS; } |