]> git.ipfire.org Git - thirdparty/libsolv.git/commit
Fix: zchunkopen: resources leaks, don't close supplied fd 444/head
authorJaroslav Rohel <jrohel@redhat.com>
Tue, 30 Mar 2021 06:42:31 +0000 (08:42 +0200)
committerJaroslav Rohel <jrohel@redhat.com>
Tue, 6 Apr 2021 08:16:09 +0000 (10:16 +0200)
commit725778574dda14dfa646f9a3f97568b15cdcbb2e
tree4944a8740f3ec54db28b036441b3cafd34872940
parentee8b8b9d72b816950e411ed26063c3a000b396ed
Fix: zchunkopen: resources leaks, don't close supplied fd

System variant:
- resource leaks when `zck_init_read` or `zck_init_write` fails
- supplied fd will be closed if `zck_create` fails

Libsolv limited zchunk implementation:
- resource leak when `strcmp(mode, "r") != 0`
- supplied fd will be closed if `solv_zchunk_open` fails (Fix is thread
  unsafe. However the original version caused a double-close in the caller
  function and was thread unsafe too.)
ext/solv_xfopen.c