diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-02-06 23:48:40 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-02-06 23:48:40 -0500 |
commit | aba099bbca9d73215affd49895a391e7eded0a4a (patch) | |
tree | 695f68f4d9dd390f539ab85c0b17b1334c3a44a8 /tests/test_0143.out | |
parent | 3fd6439f571a56771c6bbc21fa638cb94c929cc3 (diff) | |
download | bfs-aba099bbca9d73215affd49895a391e7eded0a4a.tar.xz |
bftw: Plug a leak if dirqueue_push() fails
If bftw_add() succeeds but dirqueue_push() fails, we need to clean up
the just-added dircache_entry. Otherwise it will leak, and we'll also
fail the cache->size == 0 assertion.
Fix it by extracting the dircache-related parts of bftw_pop() into a new
helper function bftw_gc(), and call it from bftw_pop() as well as the
bftw_push() failure path.
Diffstat (limited to 'tests/test_0143.out')
0 files changed, 0 insertions, 0 deletions