1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00
lvm2/lib/format_text
Peter Rajnoha d03b1779b4 coverity: fix possible resource leak in _print_historical_lv function
The code in _print_historical_lv function works with temporary
"descendants_buffer" that is allocated and freed within this
function.

When printing text out, we used "outf" macro which called
"out_text" fn and it checked return value and if failed,
the macro called "return_0" automatically. But since we
use the temporary buffer, if any of the out_text calls
fails, we need to deallocate this buffer properly - that's
the "goto_out", otherwise we'll be leaking memory.

So add new "outfgo" helper macro which does the same as "outf",
but it calls "goto_out" instead of "return_0" so we can jump
to a cleanup hook at the end.
2016-03-07 10:43:50 +01:00
..
2016-01-21 12:11:37 +01:00
2016-02-25 09:14:10 -06:00
2016-02-25 09:14:10 -06:00
2016-01-21 12:11:37 +01:00
2016-02-25 09:14:10 -06:00
2016-01-21 12:11:37 +01:00
2016-01-21 12:11:37 +01:00
2016-01-21 12:11:37 +01:00
2016-01-21 12:11:37 +01:00