]> sourceware.org Git - lvm2.git/commit
mm: fix leak in fail path
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 13 May 2013 10:59:38 +0000 (12:59 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 13 May 2013 11:13:20 +0000 (13:13 +0200)
commit55fe07ad98315d9471a86affd0680749e349a0a6
treedf4e026a59c189165920d1d2d19aae15ccd54ea2
parente926f22457774596d6051aa9e8ee22b884f2299d
mm: fix leak in fail path

If the dm_realloc would fail, the already allocate _maps_buffer
memory would have been lost (overwritten with NULL).
Fix this by using temporary line buffer.

Also add a minor cleanup to set end of buffer to '\0',
only when we really know the file size fits the preallocated buffer.
WHATS_NEW
lib/mm/memlock.c
This page took 0.039137 seconds and 5 git commands to generate.