| 627 | } |
| 628 | |
| 629 | sctp_hmaclist_t * |
| 630 | sctp_alloc_hmaclist(uint16_t num_hmacs) |
| 631 | { |
| 632 | sctp_hmaclist_t *new_list; |
| 633 | int alloc_size; |
| 634 | |
| 635 | alloc_size = sizeof(*new_list) + num_hmacs * sizeof(new_list->hmac[0]); |
| 636 | SCTP_MALLOC(new_list, sctp_hmaclist_t *, alloc_size, |
| 637 | SCTP_M_AUTH_HL); |
| 638 | if (new_list == NULL) { |
| 639 | /* out of memory */ |
| 640 | return (NULL); |
| 641 | } |
| 642 | new_list->max_algo = num_hmacs; |
| 643 | new_list->num_algo = 0; |
| 644 | return (new_list); |
| 645 | } |
| 646 | |
| 647 | void |
| 648 | sctp_free_hmaclist(sctp_hmaclist_t *list) |
no outgoing calls
no test coverage detected