Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 68319f9

Browse files
committed
Fix memory leak in new psql \du code.
1 parent b0546a2 commit 68319f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/bin/psql/describe.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.29 2001/05/09 17:29:10 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.30 2001/05/09 17:49:42 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "describe.h"
@@ -981,6 +981,8 @@ describeUsers (const char *name)
981981
"lll", &myopt, pset.queryFout);
982982

983983
/* clean up */
984+
for (i = 0; i < PQntuples(res); i++)
985+
free(cells[i * cols + 2]);
984986
free(cells);
985987

986988
PQclear(res);

0 commit comments

Comments
 (0)