diff options
Diffstat (limited to 'src/reclaim')
-rw-r--r-- | src/reclaim/gnunet-service-reclaim_tickets.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.c b/src/reclaim/gnunet-service-reclaim_tickets.c index 70075bb8e..0dd87aee9 100644 --- a/src/reclaim/gnunet-service-reclaim_tickets.c +++ b/src/reclaim/gnunet-service-reclaim_tickets.c | |||
@@ -1295,14 +1295,13 @@ issue_ticket (struct TicketIssueHandle *ih) | |||
1295 | char *label; | 1295 | char *label; |
1296 | int i; | 1296 | int i; |
1297 | int j; | 1297 | int j; |
1298 | int record_count; | 1298 | int record_count = 1; /* At least 1 record for the ticket */ |
1299 | 1299 | ||
1300 | for (le = ih->attrs->list_head; NULL != le; le = le->next) | 1300 | for (le = ih->attrs->list_head; NULL != le; le = le->next) |
1301 | record_count++; | 1301 | record_count += 2; /* Worst case we have one presentation per attribute */ |
1302 | 1302 | ||
1303 | // Worst case we have one presentation per attribute | ||
1304 | attrs_record = | 1303 | attrs_record = |
1305 | GNUNET_malloc (1 + 2 * record_count * sizeof(struct GNUNET_GNSRECORD_Data)); | 1304 | GNUNET_malloc (record_count * sizeof(struct GNUNET_GNSRECORD_Data)); |
1306 | i = 0; | 1305 | i = 0; |
1307 | for (le = ih->attrs->list_head; NULL != le; le = le->next) | 1306 | for (le = ih->attrs->list_head; NULL != le; le = le->next) |
1308 | { | 1307 | { |