From 4bcfd0476d3074a93e880320951345d8a9435838 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 7 Dec 2019 16:58:43 +0100 Subject: do not run cleaner on part that was never setup --- src/pq/pq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/pq/pq.c') diff --git a/src/pq/pq.c b/src/pq/pq.c index d2b9a6174..eca097e58 100644 --- a/src/pq/pq.c +++ b/src/pq/pq.c @@ -168,7 +168,10 @@ GNUNET_PQ_extract_result (PGresult *result, spec->dst); if (GNUNET_OK != ret) { - GNUNET_PQ_cleanup_result (rs); + for (unsigned int j = 0; j < i; j++) + if (NULL != rs[j].cleaner) + rs[j].cleaner (rs[j].cls, + rs[j].dst); return GNUNET_SYSERR; } if (NULL != spec->result_size) -- cgit v1.2.3