Fixed bug where wrong thing was being checked for NULL before calling

free(), resulting in a panic. This happend whenever an irq had already
been allocated by another device (like something on the ISA bus).
This commit is contained in:
David Greenman 1995-10-02 13:43:11 +00:00
parent c4bc3d3ffa
commit df31aac551
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=11130
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: pci.c,v 1.30 1995/09/14 13:09:40 se Exp $
** $Id: pci.c,v 1.31 1995/09/14 23:24:29 se Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@ -1369,7 +1369,7 @@ fail:
** If included in mask, remove it.
*/
if (free) free (new, M_DEVBUF);
if (new) free(new, M_DEVBUF);
if (!mdp) (void) pcibus->pb_imaskexc (irq, maskptr);
splx (oldspl);
return (0);

View File

@ -1,6 +1,6 @@
/**************************************************************************
**
** $Id: pci.c,v 1.30 1995/09/14 13:09:40 se Exp $
** $Id: pci.c,v 1.31 1995/09/14 23:24:29 se Exp $
**
** General subroutines for the PCI bus.
** pci_configure ()
@ -1369,7 +1369,7 @@ fail:
** If included in mask, remove it.
*/
if (free) free (new, M_DEVBUF);
if (new) free(new, M_DEVBUF);
if (!mdp) (void) pcibus->pb_imaskexc (irq, maskptr);
splx (oldspl);
return (0);