Missing calls to PQclear in large_obj.c and describe.c.
Greg Sabino Mullane
This commit is contained in:
parent
b256f24264
commit
7dc5472d48
@ -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.77 2003/05/28 16:03:59 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.78 2003/06/27 16:55:22 tgl Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "describe.h"
|
#include "describe.h"
|
||||||
@ -963,7 +963,10 @@ describeOneTableDetails(const char *schemaname,
|
|||||||
oid);
|
oid);
|
||||||
result2 = PSQLexec(buf.data, false);
|
result2 = PSQLexec(buf.data, false);
|
||||||
if (!result2)
|
if (!result2)
|
||||||
|
{
|
||||||
|
PQclear(result1);
|
||||||
goto error_return;
|
goto error_return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
check_count = PQntuples(result2);
|
check_count = PQntuples(result2);
|
||||||
}
|
}
|
||||||
@ -978,7 +981,11 @@ describeOneTableDetails(const char *schemaname,
|
|||||||
oid);
|
oid);
|
||||||
result3 = PSQLexec(buf.data, false);
|
result3 = PSQLexec(buf.data, false);
|
||||||
if (!result3)
|
if (!result3)
|
||||||
|
{
|
||||||
|
PQclear(result1);
|
||||||
|
PQclear(result2);
|
||||||
goto error_return;
|
goto error_return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
rule_count = PQntuples(result3);
|
rule_count = PQntuples(result3);
|
||||||
}
|
}
|
||||||
@ -998,7 +1005,12 @@ describeOneTableDetails(const char *schemaname,
|
|||||||
oid);
|
oid);
|
||||||
result4 = PSQLexec(buf.data, false);
|
result4 = PSQLexec(buf.data, false);
|
||||||
if (!result4)
|
if (!result4)
|
||||||
|
{
|
||||||
|
PQclear(result1);
|
||||||
|
PQclear(result2);
|
||||||
|
PQclear(result3);
|
||||||
goto error_return;
|
goto error_return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
trigger_count = PQntuples(result4);
|
trigger_count = PQntuples(result4);
|
||||||
}
|
}
|
||||||
@ -1014,7 +1026,13 @@ describeOneTableDetails(const char *schemaname,
|
|||||||
oid);
|
oid);
|
||||||
result5 = PSQLexec(buf.data, false);
|
result5 = PSQLexec(buf.data, false);
|
||||||
if (!result5)
|
if (!result5)
|
||||||
|
{
|
||||||
|
PQclear(result1);
|
||||||
|
PQclear(result2);
|
||||||
|
PQclear(result3);
|
||||||
|
PQclear(result4);
|
||||||
goto error_return;
|
goto error_return;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
foreignkey_count = PQntuples(result5);
|
foreignkey_count = PQntuples(result5);
|
||||||
}
|
}
|
||||||
|
@ -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/large_obj.c,v 1.25 2003/04/18 23:38:47 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/bin/psql/large_obj.c,v 1.26 2003/06/27 16:55:23 tgl Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "large_obj.h"
|
#include "large_obj.h"
|
||||||
@ -78,6 +78,7 @@ handle_transaction(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
PQsetNoticeProcessor(pset.db, old_notice_hook, NULL);
|
PQsetNoticeProcessor(pset.db, old_notice_hook, NULL);
|
||||||
|
PQclear(res);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -324,6 +325,7 @@ do_lo_unlink(const char *loid_arg)
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
PQclear(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (own_transaction)
|
if (own_transaction)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user