Date: Mon, 15 Nov 2010 22:05:08 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r215350 - head/sys/dev/nfe Message-ID: <201011152205.oAFM58Rf030117@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Mon Nov 15 22:05:08 2010 New Revision: 215350 URL: http://svn.freebsd.org/changeset/base/215350 Log: Plug memory leakage introduced in r215327. Submitted by: jkim Modified: head/sys/dev/nfe/if_nfe.c Modified: head/sys/dev/nfe/if_nfe.c ============================================================================== --- head/sys/dev/nfe/if_nfe.c Mon Nov 15 21:58:10 2010 (r215349) +++ head/sys/dev/nfe/if_nfe.c Mon Nov 15 22:05:08 2010 (r215350) @@ -804,7 +804,7 @@ nfe_can_use_msix(struct nfe_softc *sc) struct msix_blacklist *mblp; char *maker, *product; - int count, n; + int count, n, use_msix; /* * Search base board manufacturer and product name table @@ -812,18 +812,25 @@ nfe_can_use_msix(struct nfe_softc *sc) */ maker = getenv("smbios.planar.maker"); product = getenv("smbios.planar.product"); + use_msix = 1; if (maker != NULL && product != NULL) { count = sizeof(msix_blacklists) / sizeof(msix_blacklists[0]); mblp = msix_blacklists; for (n = 0; n < count; n++) { if (strcmp(maker, mblp->maker) == 0 && - strcmp(product, mblp->product) == 0) - return (0); + strcmp(product, mblp->product) == 0) { + use_msix = 0; + break; + } mblp++; } } + if (maker != NULL) + freeenv(maker); + if (product != NULL) + freeenv(product); - return (1); + return (use_msix); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011152205.oAFM58Rf030117>