From 1e7bef9762644445fd34a554488711b3881c699a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 9 Jul 2015 22:29:10 +0200 Subject: -fix leaks --- src/mintdb/plugin_mintdb_postgres.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mintdb/plugin_mintdb_postgres.c') diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c index f2bc83677..8737809bc 100644 --- a/src/mintdb/plugin_mintdb_postgres.c +++ b/src/mintdb/plugin_mintdb_postgres.c @@ -3030,6 +3030,7 @@ postgres_get_coin_transactions (void *cls, if (PGRES_TUPLES_OK != PQresultStatus (result)) { QUERY_ERR (result); + PQclear (result); goto cleanup; } nrows = PQntuples (result); @@ -3072,6 +3073,7 @@ postgres_get_coin_transactions (void *cls, { GNUNET_break (0); GNUNET_free (deposit); + PQclear (result); goto cleanup; } deposit->coin.coin_pub = *coin_pub; @@ -3083,6 +3085,7 @@ postgres_get_coin_transactions (void *cls, head = tl; continue; } + PQclear (result); } /* Handle refreshing */ { @@ -3129,6 +3132,7 @@ postgres_get_coin_transactions (void *cls, { GNUNET_break (0); GNUNET_free (melt); + PQclear (result); goto cleanup; } } @@ -3139,6 +3143,7 @@ postgres_get_coin_transactions (void *cls, head = tl; continue; } + PQclear (result); } /* FIXME: Handle locked coins (#3625) */ return head; -- cgit v1.2.3