aboutsummaryrefslogtreecommitdiff
path: root/src/pq/db_pq.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-15 14:36:08 +0200
committerChristian Grothoff <christian@grothoff.org>2015-05-15 14:36:08 +0200
commit955054bf25222be9c3942f695e74c8195627405c (patch)
tree6cf43afb1902054b972f0e7c24a623420e320065 /src/pq/db_pq.c
parent6c774a1f032e2e09ab5e22a58a1979acc2c3430b (diff)
downloadexchange-955054bf25222be9c3942f695e74c8195627405c.tar.xz
misc bugfixes
Diffstat (limited to 'src/pq/db_pq.c')
-rw-r--r--src/pq/db_pq.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/pq/db_pq.c b/src/pq/db_pq.c
index 220ce9f94..3b39645a7 100644
--- a/src/pq/db_pq.c
+++ b/src/pq/db_pq.c
@@ -225,25 +225,34 @@ TALER_PQ_cleanup_result (struct TALER_PQ_ResultSpec *rs)
switch (rs[i].format)
{
case TALER_PQ_RF_VARSIZE_BLOB:
- if (NULL != rs[i].dst)
{
- GNUNET_free (rs[i].dst);
- rs[i].dst = NULL;
- *rs[i].result_size = 0;
+ void **dst = rs[i].dst;
+ if (NULL != *dst)
+ {
+ GNUNET_free (*dst);
+ *dst = NULL;
+ *rs[i].result_size = 0;
+ }
+ break;
}
- break;
case TALER_PQ_RF_RSA_PUBLIC_KEY:
- if (NULL != rs[i].dst)
{
- GNUNET_CRYPTO_rsa_public_key_free (rs[i].dst);
- rs[i].dst = NULL;
+ void **dst = rs[i].dst;
+ if (NULL != *dst)
+ {
+ GNUNET_CRYPTO_rsa_public_key_free (*dst);
+ *dst = NULL;
+ }
+ break;
}
- break;
case TALER_PQ_RF_RSA_SIGNATURE:
- if (NULL != rs[i].dst)
{
- GNUNET_CRYPTO_rsa_signature_free (rs[i].dst);
- rs[i].dst = NULL;
+ void **dst = rs[i].dst;
+ if (NULL != *dst)
+ {
+ GNUNET_CRYPTO_rsa_signature_free (*dst);
+ *dst = NULL;
+ }
}
break;
default: