mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Fix memory leak in new psql \du code.
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2000 by PostgreSQL Global Development Group
|
* Copyright 2000 by PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.29 2001/05/09 17:29:10 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.30 2001/05/09 17:49:42 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "describe.h"
|
#include "describe.h"
|
||||||
@ -981,6 +981,8 @@ describeUsers (const char *name)
|
|||||||
"lll", &myopt, pset.queryFout);
|
"lll", &myopt, pset.queryFout);
|
||||||
|
|
||||||
/* clean up */
|
/* clean up */
|
||||||
|
for (i = 0; i < PQntuples(res); i++)
|
||||||
|
free(cells[i * cols + 2]);
|
||||||
free(cells);
|
free(cells);
|
||||||
|
|
||||||
PQclear(res);
|
PQclear(res);
|
||||||
|
Reference in New Issue
Block a user