* allocate structure space for a key of length keylen */
| 241 | * allocate structure space for a key of length keylen |
| 242 | */ |
| 243 | sctp_key_t * |
| 244 | sctp_alloc_key(uint32_t keylen) |
| 245 | { |
| 246 | sctp_key_t *new_key; |
| 247 | |
| 248 | SCTP_MALLOC(new_key, sctp_key_t *, sizeof(*new_key) + keylen, |
| 249 | SCTP_M_AUTH_KY); |
| 250 | if (new_key == NULL) { |
| 251 | /* out of memory */ |
| 252 | return (NULL); |
| 253 | } |
| 254 | new_key->keylen = keylen; |
| 255 | return (new_key); |
| 256 | } |
| 257 | |
| 258 | void |
| 259 | sctp_free_key(sctp_key_t *key) |
no outgoing calls
no test coverage detected