- Discrepency between malloc / free types with init vector (see free
in netipsec/key.c). - Reviewed by christos.
This commit is contained in:
parent
40b52d3132
commit
7ce7d7cb4c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: xform_esp.c,v 1.5 2004/03/17 00:21:43 jonathan Exp $ */
|
||||
/* $NetBSD: xform_esp.c,v 1.6 2005/05/27 22:30:03 seanb Exp $ */
|
||||
/* $FreeBSD: src/sys/netipsec/xform_esp.c,v 1.2.2.1 2003/01/24 05:11:36 sam Exp $ */
|
||||
/* $OpenBSD: ip_esp.c,v 1.69 2001/06/26 06:18:59 angelos Exp $ */
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.5 2004/03/17 00:21:43 jonathan Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xform_esp.c,v 1.6 2005/05/27 22:30:03 seanb Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#ifdef __FreeBSD__
|
||||
@ -204,7 +204,7 @@ esp_init(struct secasvar *sav, struct xformsw *xsp)
|
||||
* compromise is to force it to zero here.
|
||||
*/
|
||||
sav->ivlen = (txform == &enc_xform_null ? 0 : txform->blocksize);
|
||||
sav->iv = (caddr_t) malloc(sav->ivlen, M_XDATA, M_WAITOK);
|
||||
sav->iv = (caddr_t) malloc(sav->ivlen, M_SECA, M_WAITOK);
|
||||
if (sav->iv == NULL) {
|
||||
DPRINTF(("esp_init: no memory for IV\n"));
|
||||
return EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user