summaryrefslogtreecommitdiffstats
path: root/net/sctp/auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/auth.c')
-rw-r--r--net/sctp/auth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sctp/auth.c b/net/sctp/auth.c
index e64630cd3331..5b537613946f 100644
--- a/net/sctp/auth.c
+++ b/net/sctp/auth.c
@@ -482,8 +482,9 @@ int sctp_auth_init_hmacs(struct sctp_endpoint *ep, gfp_t gfp)
482 return 0; 482 return 0;
483 483
484 /* Allocated the array of pointers to transorms */ 484 /* Allocated the array of pointers to transorms */
485 ep->auth_hmacs = kzalloc(sizeof(struct crypto_shash *) * 485 ep->auth_hmacs = kcalloc(SCTP_AUTH_NUM_HMACS,
486 SCTP_AUTH_NUM_HMACS, gfp); 486 sizeof(struct crypto_shash *),
487 gfp);
487 if (!ep->auth_hmacs) 488 if (!ep->auth_hmacs)
488 return -ENOMEM; 489 return -ENOMEM;
489 490