svn commit: r296303 - head/sys/netipsec

Mark Johnston markj at FreeBSD.org
Wed Mar 2 05:04:05 UTC 2016


Author: markj
Date: Wed Mar  2 05:04:04 2016
New Revision: 296303
URL: https://svnweb.freebsd.org/changeset/base/296303

Log:
  Set tres to NULL to avoid a double free if the m_pullup() below fails.
  
  Reviewed by:	glebius
  MFC after:	1 week
  Differential Revision:	https://reviews.freebsd.org/D5497

Modified:
  head/sys/netipsec/key.c

Modified: head/sys/netipsec/key.c
==============================================================================
--- head/sys/netipsec/key.c	Wed Mar  2 05:01:58 2016	(r296302)
+++ head/sys/netipsec/key.c	Wed Mar  2 05:04:04 2016	(r296303)
@@ -3490,6 +3490,7 @@ key_setdumpsa(struct secasvar *sav, u_in
 	}
 
 	m_cat(result, tres);
+	tres = NULL;
 	if (result->m_len < sizeof(struct sadb_msg)) {
 		result = m_pullup(result, sizeof(struct sadb_msg));
 		if (result == NULL)


More information about the svn-src-head mailing list