avoid dangling pointer
This commit is contained in:
parent
2e65fa8366
commit
cb1548d1a0
@ -869,6 +869,12 @@ bhist_cb (void *cls,
|
|||||||
GNUNET_free (subject);
|
GNUNET_free (subject);
|
||||||
wd.account_details = details->account_details;
|
wd.account_details = details->account_details;
|
||||||
|
|
||||||
|
GNUNET_break (NULL != whh->hh);
|
||||||
|
|
||||||
|
/* Once we get the sentinel element, the handle becomes invalid. */
|
||||||
|
if (TALER_BANK_DIRECTION_NONE == dir)
|
||||||
|
whh->hh = NULL;
|
||||||
|
|
||||||
if ( (NULL != whh->hres_cb) &&
|
if ( (NULL != whh->hres_cb) &&
|
||||||
(GNUNET_OK !=
|
(GNUNET_OK !=
|
||||||
whh->hres_cb (whh->hres_cb_cls,
|
whh->hres_cb (whh->hres_cb_cls,
|
||||||
@ -1007,7 +1013,11 @@ static void
|
|||||||
test_get_history_cancel (void *cls,
|
test_get_history_cancel (void *cls,
|
||||||
struct TALER_WIRE_HistoryHandle *whh)
|
struct TALER_WIRE_HistoryHandle *whh)
|
||||||
{
|
{
|
||||||
TALER_BANK_history_cancel (whh->hh);
|
if (NULL != whh->hh)
|
||||||
|
{
|
||||||
|
TALER_BANK_history_cancel (whh->hh);
|
||||||
|
whh->hh = NULL;
|
||||||
|
}
|
||||||
GNUNET_free (whh);
|
GNUNET_free (whh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user