mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-03 17:11:32 +00:00
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
This commit is contained in:
parent
f6ed0a3918
commit
3543e138e5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=296303
@ -3490,6 +3490,7 @@ key_setdumpsa(struct secasvar *sav, u_int8_t type, u_int8_t satype,
|
||||
}
|
||||
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user