Date: Sat, 29 Nov 2008 14:20:36 +0000 (UTC) From: Rui Paulo <rpaulo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185433 - head/sys/dev/asmc Message-ID: <200811291420.mATEKa6t053437@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rpaulo Date: Sat Nov 29 14:20:36 2008 New Revision: 185433 URL: http://svn.freebsd.org/changeset/base/185433 Log: Check for non-existing model DMI string. Submitted by: ganbold Found with: Coverity Prevent(tm) CID: 2434 MFC after: 1 week Modified: head/sys/dev/asmc/asmc.c Modified: head/sys/dev/asmc/asmc.c ============================================================================== --- head/sys/dev/asmc/asmc.c Sat Nov 29 13:34:59 2008 (r185432) +++ head/sys/dev/asmc/asmc.c Sat Nov 29 14:20:36 2008 (r185433) @@ -254,6 +254,9 @@ asmc_match(device_t dev) char *model; model = getenv("smbios.system.product"); + if (model == NULL) + return (NULL); + for (i = 0; asmc_models[i].smc_model; i++) { if (!strncmp(model, asmc_models[i].smc_model, strlen(model))) { freeenv(model);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811291420.mATEKa6t053437>