mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
psql: Fix memory leak
In expanded auto mode, a lot of allocated memory was not cleaned up. found by Coverity
This commit is contained in:
@ -735,7 +735,7 @@ print_aligned_text(const printTableContent *cont, FILE *fout)
|
|||||||
(output_columns < total_header_width || output_columns < width_total))
|
(output_columns < total_header_width || output_columns < width_total))
|
||||||
{
|
{
|
||||||
print_aligned_vertical(cont, fout);
|
print_aligned_vertical(cont, fout);
|
||||||
return;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we wrapped beyond the display width, use the pager */
|
/* 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);
|
fputc('\n', fout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cleanup:
|
||||||
/* clean up */
|
/* clean up */
|
||||||
for (i = 0; i < col_count; i++)
|
for (i = 0; i < col_count; i++)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user