Date: Sat, 29 Jun 2013 16:49:01 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252381 - head/sys/contrib/dev/ath/ath_hal/ar9300 Message-ID: <201306291649.r5TGn1QS037646@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sat Jun 29 16:49:00 2013 New Revision: 252381 URL: http://svnweb.freebsd.org/changeset/base/252381 Log: Check the return value from ath_hal_malloc() Reported by: uqs Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sat Jun 29 16:45:37 2013 (r252380) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c Sat Jun 29 16:49:00 2013 (r252381) @@ -639,6 +639,11 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC /* FreeBSD: to make OTP work for now, provide this.. */ AH9300(ah)->ah_cal_mem = ath_hal_malloc(HOST_CALDATA_SIZE); + if (AH9300(ah)->ah_cal_mem == NULL) { + ath_hal_printf(ah, "%s: caldata malloc failed!\n", __func__); + ecode = HAL_EIO; + goto bad; + } /* * If eepromdata is not NULL, copy it it into ah_cal_mem.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306291649.r5TGn1QS037646>