aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Malone <dwmalone@FreeBSD.org>2001-01-22 22:54:02 +0000
committerDavid Malone <dwmalone@FreeBSD.org>2001-01-22 22:54:02 +0000
commitd2db050252d9ba70c6a785b62d79736aa46497aa (patch)
tree696efdda7b6bf35b0b2f7ddc16f5164e4de97b5d /sys
parentbfcd63152908560c4873d2c67d79d8c682f32155 (diff)
downloadsrc-d2db050252d9ba70c6a785b62d79736aa46497aa.tar.gz
src-d2db050252d9ba70c6a785b62d79736aa46497aa.zip
Free the kbd pointer when it isn't NULL, as opposed to when it is.
This was a typo in the M_ZERO patches. Submitted by: Mike Silbersack <silby@silby.com>
Notes
Notes: svn path=/head/; revision=71394
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/atkbdc/atkbd.c2
-rw-r--r--sys/dev/kbd/atkbd.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c
index b14cfdba5706..05a98f417d03 100644
--- a/sys/dev/atkbdc/atkbd.c
+++ b/sys/dev/atkbdc/atkbd.c
@@ -372,7 +372,7 @@ atkbd_init(int unit, keyboard_t **kbdp, void *arg, int flags)
free(accmap, M_DEVBUF);
if (fkeymap != NULL)
free(fkeymap, M_DEVBUF);
- if (kbd == NULL)
+ if (kbd != NULL)
free(kbd, M_DEVBUF);
return ENOMEM;
}
diff --git a/sys/dev/kbd/atkbd.c b/sys/dev/kbd/atkbd.c
index b14cfdba5706..05a98f417d03 100644
--- a/sys/dev/kbd/atkbd.c
+++ b/sys/dev/kbd/atkbd.c
@@ -372,7 +372,7 @@ atkbd_init(int unit, keyboard_t **kbdp, void *arg, int flags)
free(accmap, M_DEVBUF);
if (fkeymap != NULL)
free(fkeymap, M_DEVBUF);
- if (kbd == NULL)
+ if (kbd != NULL)
free(kbd, M_DEVBUF);
return ENOMEM;
}