aboutsummaryrefslogtreecommitdiff
path: root/src/datacache/plugin_datacache_postgres.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datacache/plugin_datacache_postgres.c')
-rw-r--r--src/datacache/plugin_datacache_postgres.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/datacache/plugin_datacache_postgres.c b/src/datacache/plugin_datacache_postgres.c
index 50d464a70c..fcd9e51613 100644
--- a/src/datacache/plugin_datacache_postgres.c
+++ b/src/datacache/plugin_datacache_postgres.c
@@ -408,7 +408,10 @@ postgres_plugin_get (void *cls,
return 0;
}
if (iter == NULL)
- return cnt;
+ {
+ PQclear (res);
+ return cnt;
+ }
if ( (3 != PQnfields (res)) ||
(sizeof (uint64_t) != PQfsize (res, 0)) ||
(sizeof (uint32_t) != PQfsize (res, 1)))