[rtems-libbsd commit] ffec: Fix NULL pointer access
Sebastian Huber
sebh at rtems.org
Wed Oct 25 12:31:12 UTC 2017
Module: rtems-libbsd
Branch: master
Commit: 798d308be877078f269f52a1df71f8926202cdf6
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=798d308be877078f269f52a1df71f8926202cdf6
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Oct 24 14:11:56 2017 +0200
ffec: Fix NULL pointer access
Update #3090.
---
freebsd/sys/dev/ffec/if_ffec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/freebsd/sys/dev/ffec/if_ffec.c b/freebsd/sys/dev/ffec/if_ffec.c
index 5801312..07b8c34 100644
--- a/freebsd/sys/dev/ffec/if_ffec.c
+++ b/freebsd/sys/dev/ffec/if_ffec.c
@@ -788,6 +788,9 @@ ffec_alloc_mbufcl(struct ffec_softc *sc)
struct mbuf *m;
m = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR);
+ if (m == NULL)
+ return (m);
+
m->m_pkthdr.len = m->m_len = m->m_ext.ext_size;
#ifdef __rtems__
rtems_cache_invalidate_multiple_data_lines(m->m_data, m->m_len);
More information about the vc
mailing list