]> git.ipfire.org Git - thirdparty/systemd.git/commit
journal: do not leak mmaps on OOM
authorPhilippe De Swert <philippedeswert@gmail.com>
Wed, 10 Sep 2014 09:20:41 +0000 (12:20 +0300)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 11 Sep 2014 15:27:44 +0000 (17:27 +0200)
commitb67ddc7bbe31cde7f69f9814204d9bb1d4623c47
treef6fe799504e198ff5071592c128f0e82f7e75c4c
parent21978bc3c90ec192130a9ea9df62a75d1262b80c
journal: do not leak mmaps on OOM

After a section of memory is succesfully allocated, some of the following
actions can still fail due to lack of memory. In this case -ENOMEM is
returned without actually freeing the already mapped memory.
Found with coverity. Fixes: CID#1237762
src/journal/mmap-cache.c