diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2012-03-07 23:52:15 +0200 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2012-03-07 23:52:15 +0200 |
commit | 1673122127f9f17f4ca6b214027c0806b0d502f4 (patch) | |
tree | 51fa2d00a0cef8dbc2680f006efd4b6b21755fc3 /src | |
parent | 561ec761332b5608a894210e00d4fee1b5c6522a (diff) | |
download | postgresql-1673122127f9f17f4ca6b214027c0806b0d502f4.tar.gz postgresql-1673122127f9f17f4ca6b214027c0806b0d502f4.zip |
psql: Fix memory leak
In expanded auto mode, a lot of allocated memory was not cleaned up.
found by Coverity
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/print.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c index 594a63acfd2..f7b5e808894 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -735,7 +735,7 @@ print_aligned_text(const printTableContent *cont, FILE *fout) (output_columns < total_header_width || output_columns < width_total)) { print_aligned_vertical(cont, fout); - return; + goto cleanup; } /* If we wrapped beyond the display width, use the pager */ @@ -1050,6 +1050,7 @@ print_aligned_text(const printTableContent *cont, FILE *fout) fputc('\n', fout); } +cleanup: /* clean up */ for (i = 0; i < col_count; i++) { |