]> git.ipfire.org Git - thirdparty/libarchive.git/commit
- Only allocate `mine` when level == 1 to clarify its lifetime and
authorNgie Cooper <yanegomi@gmail.com>
Sun, 11 Dec 2016 02:17:01 +0000 (18:17 -0800)
committerNgie Cooper <yanegomi@gmail.com>
Sun, 11 Dec 2016 02:17:01 +0000 (18:17 -0800)
commit2787fd2cd813e579f799f01e1bb5425551938d59
tree3827bb7feb90b87332a23e2ce875c45db10b3206
parent45ad9b555145ded81c8d3b59202e9c8980a25929
- Only allocate `mine` when level == 1 to clarify its lifetime and
  leak the value less often.
- Only free mine->copy_buff when mine != NULL to avoid segfaults if
  memory_read_close(..) is called with client_data == NULL.

This should either address or mitigate the issue reported with Coverity
(CID # 1331663)
libarchive/test/read_open_memory.c