avoid failure mode

This commit is contained in:
Christian Grothoff 2021-06-16 15:39:06 +02:00
parent 3fa945e796
commit 3e3fb304f4
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC

View File

@ -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;