svn commit: r198329 - head/sys/dev/ips
Christian Brueffer
brueffer at FreeBSD.org
Wed Oct 21 15:04:51 UTC 2009
Author: brueffer
Date: Wed Oct 21 15:04:50 2009
New Revision: 198329
URL: http://svn.freebsd.org/changeset/base/198329
Log:
Check pointer for NULL before dereferencing it, not after.
PR: 138384
Submitted by: Patroklos Argyroudis <argp at census-labs.com>
MFC after: 1 week
Modified:
head/sys/dev/ips/ips_disk.c
Modified: head/sys/dev/ips/ips_disk.c
==============================================================================
--- head/sys/dev/ips/ips_disk.c Wed Oct 21 14:20:55 2009 (r198328)
+++ head/sys/dev/ips/ips_disk.c Wed Oct 21 15:04:50 2009 (r198329)
@@ -192,10 +192,10 @@ ipsd_dump(void *arg, void *virtual, vm_o
dp = arg;
dsc = dp->d_drv1;
- sc = dsc->sc;
if (dsc == NULL)
return (EINVAL);
+ sc = dsc->sc;
if (ips_get_free_cmd(sc, &command, 0) != 0) {
printf("ipsd: failed to get cmd for dump\n");
More information about the svn-src-all
mailing list