Date: Sat, 26 Nov 2011 23:18:19 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r228011 - head/sys/netipsec Message-ID: <201111262318.pAQNIJvG012737@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pjd Date: Sat Nov 26 23:18:19 2011 New Revision: 228011 URL: http://svn.freebsd.org/changeset/base/228011 Log: malloc(M_WAITOK) never fails, so there is no need to check for NULL. Modified: head/sys/netipsec/xform_esp.c Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Sat Nov 26 23:15:28 2011 (r228010) +++ head/sys/netipsec/xform_esp.c Sat Nov 26 23:18:19 2011 (r228011) @@ -195,10 +195,6 @@ esp_init(struct secasvar *sav, struct xf */ sav->ivlen = (txform == &enc_xform_null ? 0 : txform->blocksize); sav->iv = (caddr_t) malloc(sav->ivlen, M_XDATA, M_WAITOK); - if (sav->iv == NULL) { - DPRINTF(("%s: no memory for IV\n", __func__)); - return EINVAL; - } key_randomfill(sav->iv, sav->ivlen); /*XXX*/ /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111262318.pAQNIJvG012737>