mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-05 09:14:03 +00:00
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>
This commit is contained in:
parent
bfcd631529
commit
d2db050252
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=71394
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user