diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2017-10-10 16:01:14 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2017-10-10 16:01:14 +0200 |
commit | 1cfa320f0cb213aed0a3a04577d065a65f847d49 (patch) | |
tree | caf0db997af48e9599c964cfccc9953ed0baca24 /src/identity-provider/identity_provider_api.c | |
parent | df344790f7f2e7c39cfd951ce373c4ec52b6cda7 (diff) | |
download | gnunet-1cfa320f0cb213aed0a3a04577d065a65f847d49.tar.gz gnunet-1cfa320f0cb213aed0a3a04577d065a65f847d49.zip |
-bugfixes, fix memleaks
Diffstat (limited to 'src/identity-provider/identity_provider_api.c')
-rw-r--r-- | src/identity-provider/identity_provider_api.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/identity-provider/identity_provider_api.c b/src/identity-provider/identity_provider_api.c index 99faf0ecd..6d28709df 100644 --- a/src/identity-provider/identity_provider_api.c +++ b/src/identity-provider/identity_provider_api.c | |||
@@ -501,12 +501,21 @@ handle_consume_ticket_result (void *cls, | |||
501 | attrs_len); | 501 | attrs_len); |
502 | if (NULL != op->ar_cb) | 502 | if (NULL != op->ar_cb) |
503 | { | 503 | { |
504 | for (le = attrs->list_head; NULL != le; le = le->next) | 504 | if (NULL == attrs) |
505 | { | ||
505 | op->ar_cb (op->cls, | 506 | op->ar_cb (op->cls, |
506 | &msg->identity, | 507 | &msg->identity, |
507 | le->attribute); | 508 | NULL); |
509 | } | ||
510 | else | ||
511 | { | ||
512 | for (le = attrs->list_head; NULL != le; le = le->next) | ||
513 | op->ar_cb (op->cls, | ||
514 | &msg->identity, | ||
515 | le->attribute); | ||
516 | attribute_list_destroy (attrs); | ||
517 | } | ||
508 | } | 518 | } |
509 | attribute_list_destroy (attrs); | ||
510 | op->ar_cb (op->cls, | 519 | op->ar_cb (op->cls, |
511 | NULL, | 520 | NULL, |
512 | NULL); | 521 | NULL); |