mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
Get rid of double PQclear(res) in error path.
This commit is contained in:
parent
273ae97052
commit
60ac5b805e
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright 2000-2002 by PostgreSQL Global Development Group
|
* Copyright 2000-2002 by PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.59 2002/08/10 03:56:24 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.60 2002/08/10 16:01:16 tgl Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "describe.h"
|
#include "describe.h"
|
||||||
@ -714,11 +714,7 @@ describeOneTableDetails(const char *schemaname,
|
|||||||
printfPQExpBuffer(&buf, "SELECT pg_catalog.pg_get_viewdef('%s'::pg_catalog.oid)", oid);
|
printfPQExpBuffer(&buf, "SELECT pg_catalog.pg_get_viewdef('%s'::pg_catalog.oid)", oid);
|
||||||
result = PSQLexec(buf.data);
|
result = PSQLexec(buf.data);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
|
||||||
PQclear(res);
|
|
||||||
PQclear(result);
|
|
||||||
goto error_return;
|
goto error_return;
|
||||||
}
|
|
||||||
|
|
||||||
if (PQntuples(result) > 0)
|
if (PQntuples(result) > 0)
|
||||||
view_def = xstrdup(PQgetvalue(result, 0, 0));
|
view_def = xstrdup(PQgetvalue(result, 0, 0));
|
||||||
|
Loading…
Reference in New Issue
Block a user