From: Christian Grothoff Date: Sat, 7 Dec 2019 15:58:43 +0000 (+0100) Subject: do not run cleaner on part that was never setup X-Git-Tag: v0.12.0~34 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4bcfd0476d3074a93e880320951345d8a9435838;p=oweals%2Fgnunet.git do not run cleaner on part that was never setup --- diff --git a/src/my/my.c b/src/my/my.c index 41d280d5e..a4099d088 100644 --- a/src/my/my.c +++ b/src/my/my.c @@ -237,7 +237,10 @@ GNUNET_MY_extract_result (struct GNUNET_MYSQL_StatementHandle *sh, "Post-conversion for MySQL result failed at offset %u\n", i); mysql_stmt_free_result (stmt); - GNUNET_MY_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; } field_off += rp->num_fields; 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)