fix memory leak on pay

This commit is contained in:
priscilla 2023-02-20 12:16:50 -05:00
parent a7f0611a88
commit b663c8a3c1
No known key found for this signature in database
GPG Key ID: B0926AF5C6A7515D

View File

@ -269,6 +269,7 @@ handle_deposit_finished (void *cls,
GNUNET_break_op (0); GNUNET_break_op (0);
dr.hr.http_status = 0; dr.hr.http_status = 0;
dr.hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED; dr.hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED;
GNUNET_JSON_parse_free (spec);
break; break;
} }
dh->exchange_sigs = GNUNET_new_array (dh->num_cdds, dh->exchange_sigs = GNUNET_new_array (dh->num_cdds,
@ -281,6 +282,7 @@ handle_deposit_finished (void *cls,
GNUNET_break_op (0); GNUNET_break_op (0);
dr.hr.http_status = 0; dr.hr.http_status = 0;
dr.hr.ec = TALER_EC_EXCHANGE_DEPOSIT_INVALID_SIGNATURE_BY_EXCHANGE; dr.hr.ec = TALER_EC_EXCHANGE_DEPOSIT_INVALID_SIGNATURE_BY_EXCHANGE;
GNUNET_JSON_parse_free (spec);
break; break;
} }
json_array_foreach (sigs, idx, sig) json_array_foreach (sigs, idx, sig)
@ -330,12 +332,14 @@ handle_deposit_finished (void *cls,
GNUNET_break_op (0); GNUNET_break_op (0);
dr.hr.http_status = 0; dr.hr.http_status = 0;
dr.hr.ec = TALER_EC_EXCHANGE_DEPOSIT_INVALID_SIGNATURE_BY_EXCHANGE; dr.hr.ec = TALER_EC_EXCHANGE_DEPOSIT_INVALID_SIGNATURE_BY_EXCHANGE;
GNUNET_JSON_parse_free (spec);
break; break;
} }
} }
TEAH_get_auditors_for_dc (dh->exchange, TEAH_get_auditors_for_dc (dh->exchange,
&auditor_cb, &auditor_cb,
dh); dh);
GNUNET_JSON_parse_free (spec);
} }
dr.details.success.exchange_sigs = dh->exchange_sigs; dr.details.success.exchange_sigs = dh->exchange_sigs;
dr.details.success.exchange_pub = &dh->exchange_pub; dr.details.success.exchange_pub = &dh->exchange_pub;