1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

coverity: fix possible resource leak of descendants_buffer in _print_historical_lv fn

This commit is contained in:
Peter Rajnoha 2016-05-31 09:36:40 +02:00
parent cfe7d2368c
commit 02d67848eb
2 changed files with 2 additions and 1 deletions

View File

@ -858,7 +858,7 @@ static int _print_historical_lv(struct formatter *f, struct historical_logical_v
if (!_alloc_printed_indirect_descendants(&hlv->indirect_glvs, &descendants_buffer)) if (!_alloc_printed_indirect_descendants(&hlv->indirect_glvs, &descendants_buffer))
goto_out; goto_out;
outnl(f); outnlgo(f);
outfgo(f, "%s {", hlv->name); outfgo(f, "%s {", hlv->name);
_inc_indent(f); _inc_indent(f);

View File

@ -22,6 +22,7 @@
#define outf(args...) do {if (!out_text(args)) return_0;} while (0) #define outf(args...) do {if (!out_text(args)) return_0;} while (0)
#define outfgo(args...) do {if (!out_text(args)) goto_out;} while (0) #define outfgo(args...) do {if (!out_text(args)) goto_out;} while (0)
#define outnl(f) do {if (!out_newline(f)) return_0;} while (0) #define outnl(f) do {if (!out_newline(f)) return_0;} while (0)
#define outnlgo(f) do {if (!out_newline(f)) goto_out;} while (0)
struct formatter; struct formatter;
struct lv_segment; struct lv_segment;