Followup pointed out by ae@

This commit is contained in:
George V. Neville-Neil 2020-11-13 13:07:44 +00:00
parent 441eb16a95
commit d65d6d5aa9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=367635

View File

@ -118,7 +118,11 @@ ip_redir_alloc(struct mbuf *m, struct nhop_object *nh,
struct ip *ip, in_addr_t *addr)
{
struct mbuf *mcopy = m_gethdr(M_NOWAIT, m->m_type);
if (mcopy != NULL && !m_dup_pkthdr(mcopy, m, M_NOWAIT)) {
if (mcopy == NULL)
return (NULL);
if (m_dup_pkthdr(mcopy, m, M_NOWAIT) == 0) {
/*
* It's probably ok if the pkthdr dup fails (because
* the deep copy of the tag chain failed), but for now