summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-06-16 15:39:06 +0200
committerChristian Grothoff <christian@grothoff.org>2021-06-16 15:39:06 +0200
commit3e3fb304f43d976c3e946f8b8a25f9b680035467 (patch)
tree38b6f6d474a19f99e53f02a4d4ddff42d8c7940a /src
parent3fa945e79646a2aab3677dec188a5850f3b278e4 (diff)
downloadexchange-3e3fb304f43d976c3e946f8b8a25f9b680035467.tar.gz
exchange-3e3fb304f43d976c3e946f8b8a25f9b680035467.tar.bz2
exchange-3e3fb304f43d976c3e946f8b8a25f9b680035467.zip
avoid failure mode
Diffstat (limited to 'src')
-rw-r--r--src/pq/pq_result_helper.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/pq/pq_result_helper.c b/src/pq/pq_result_helper.c
index fdf3dc34..c1c8fe5e 100644
--- a/src/pq/pq_result_helper.c
+++ b/src/pq/pq_result_helper.c
@@ -228,8 +228,13 @@ extract_amount (void *cls,
val_name,
frac_name,
&amount_nbo);
- TALER_amount_ntoh (r_amount,
- &amount_nbo);
+ if (GNUNET_OK == ret)
+ TALER_amount_ntoh (r_amount,
+ &amount_nbo);
+ else
+ memset (r_amount,
+ 0,
+ sizeof (struct TALER_Amount));
GNUNET_free (val_name);
GNUNET_free (frac_name);
return ret;