From 4bda418f6a94e0807a3f739db9eab8ad3cfa0d57 Mon Sep 17 00:00:00 2001 From: Will Brown Date: Mon, 25 Nov 2024 01:22:41 -0500 Subject: [PATCH] [feed_info.c] Finish up our database query --- feed_info.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/feed_info.c b/feed_info.c index f8d2551..c0767ea 100644 --- a/feed_info.c +++ b/feed_info.c @@ -81,9 +81,12 @@ zblock_feed_info_err zblock_feed_info_retrieve_list_item(PGconn *conn, zblock_fe if (PQresultStatus(res) != PGRES_TUPLES_OK) { log_error("Unable to retrieve feeds: %s", PQresultErrorMessage(res)); PQclear(res); + PQgetResult(conn); return ZBLOCK_FEED_INFO_DBERROR; } else { PQclear(res); + // we need to do this one last time or the next query won't work + PQgetResult(conn); return ZBLOCK_FEED_INFO_FINISHED; } }