Date: Tue, 21 Aug 2018 22:15:57 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338160 - head/sys/dev/cxgbe Message-ID: <201808212215.w7LMFvB4005090@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Tue Aug 21 22:15:57 2018 New Revision: 338160 URL: https://svnweb.freebsd.org/changeset/base/338160 Log: cxgbe(4): Do not leak memory in case of errors during VI initialization. Reported by: Coverity (CID 1392026) MFC after: 1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Tue Aug 21 21:42:17 2018 (r338159) +++ head/sys/dev/cxgbe/t4_main.c Tue Aug 21 22:15:57 2018 (r338160) @@ -5099,6 +5099,7 @@ vi_full_init(struct vi_info *vi) rc = -t4_config_rss_range(sc, sc->mbox, vi->viid, 0, vi->rss_size, rss, vi->rss_size); if (rc != 0) { + free(rss, M_CXGBE); if_printf(ifp, "rss_config failed: %d\n", rc); goto done; } @@ -5147,6 +5148,7 @@ vi_full_init(struct vi_info *vi) #endif rc = -t4_config_vi_rss(sc, sc->mbox, vi->viid, hashen, rss[0], 0, 0); if (rc != 0) { + free(rss, M_CXGBE); if_printf(ifp, "rss hash/defaultq config failed: %d\n", rc); goto done; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808212215.w7LMFvB4005090>