Date: Sat, 16 Jul 2016 02:57:38 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r302926 - stable/10/sys/ofed/include/linux Message-ID: <201607160257.u6G2vcib055893@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Sat Jul 16 02:57:37 2016 New Revision: 302926 URL: https://svnweb.freebsd.org/changeset/base/302926 Log: MFC r301877: Add a missing error check for a malloc() call in idr_get(). Modified: stable/10/sys/ofed/include/linux/linux_idr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/include/linux/linux_idr.c ============================================================================== --- stable/10/sys/ofed/include/linux/linux_idr.c Sat Jul 16 02:55:02 2016 (r302925) +++ stable/10/sys/ofed/include/linux/linux_idr.c Sat Jul 16 02:57:37 2016 (r302926) @@ -267,7 +267,8 @@ idr_get(struct idr *idr) return (il); } il = malloc(sizeof(*il), M_IDR, M_ZERO | M_NOWAIT); - bitmap_fill(&il->bitmap, IDR_SIZE); + if (il != NULL) + bitmap_fill(&il->bitmap, IDR_SIZE); return (il); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607160257.u6G2vcib055893>