From 4e55dc6370b5b92cb2ed3ee93599ecbd72ddccf4 Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Wed, 21 Oct 2009 10:49:34 +0200 Subject: Fixed a couple of memory leaks in db_wait_notification() --- server/parser/pgsql.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server/parser/pgsql.c') diff --git a/server/parser/pgsql.c b/server/parser/pgsql.c index 168bdaa..bbdb6d8 100644 --- a/server/parser/pgsql.c +++ b/server/parser/pgsql.c @@ -406,6 +406,7 @@ int db_wait_notification(dbconn *dbc, const int *shutdown, const char *listenfor PQclear(dbres); return -1; } + PQclear(dbres); // Start listening and waiting while( ret == 0 ) { @@ -452,7 +453,9 @@ int db_wait_notification(dbconn *dbc, const int *shutdown, const char *listenfor free_nullsafe(sql); ret = -1; } + free_nullsafe(sql); PQclear(dbres); + return ret; } -- cgit