Michael McConville wrote:
> Does this make sense?

I just realized that the allocation failure checks earlier in the
function return ENOBUFS. This probably makes more sense for the sake of
consistency.

> Index: sys/crypto/cryptosoft.c
> ===================================================================
> RCS file: /cvs/src/sys/crypto/cryptosoft.c,v
> retrieving revision 1.80
> diff -u -p -r1.80 cryptosoft.c
> --- sys/crypto/cryptosoft.c   10 Dec 2015 21:00:51 -0000      1.80
> +++ sys/crypto/cryptosoft.c   26 Feb 2016 17:21:00 -0000
> @@ -826,7 +826,7 @@ swcr_newsession(u_int32_t *sid, struct c
>                                   M_CRYPTO_DATA, M_NOWAIT | M_ZERO);
>                               if ((*swd)->sw_kschedule == NULL) {
>                                       swcr_freesession(i);
> -                                     return EINVAL;
> +                                     return ENOMEM;
>                               }
>                       }
>                       if (txf->setkey((*swd)->sw_kschedule, cri->cri_key,
> 

Reply via email to