]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: (parser) fix memory leak on error before end-of-file
authorKarel Zak <kzak@redhat.com>
Fri, 26 Jun 2020 10:59:32 +0000 (12:59 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 26 Jun 2020 10:59:32 +0000 (12:59 +0200)
commitfe0d12d4f82269096f8d0cffc51ca9590814c284
tree89ff280eed797bcfe725dddb97d60659e7917c22
parentd454da17dae4071e0c9a5d4341738164f8adbeb8
libmount: (parser) fix memory leak on error before end-of-file

Let's simplify the loop where we add FS to the table. The optimization
for recoverable errors is a fragile overkill. The new code always
allocates and unrefs FS for each loop.

Addresses: https://github.com/karelzak/util-linux/pull/1068
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/fs.c
libmount/src/tab_parse.c