diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-10-02 20:29:54 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2002-10-02 20:29:54 +0000 |
| commit | 42117b6c4d8866c78525f26816000706128759e2 (patch) | |
| tree | a335234fd8fd101b0cdc32f4d78fb94265e8eb40 /sys/dev/fdc/fdc.c | |
| parent | 0b15d9a1b6152d0fa2adcc1c40156c484d7cb67c (diff) | |
Notes
Diffstat (limited to 'sys/dev/fdc/fdc.c')
| -rw-r--r-- | sys/dev/fdc/fdc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c index d67d902dc808..fdd2ca4d1478 100644 --- a/sys/dev/fdc/fdc.c +++ b/sys/dev/fdc/fdc.c @@ -985,8 +985,10 @@ fdc_add_child(device_t dev, const char *name, int unit) if (resource_int_value(name, unit, "drive", &ivar->fdunit) != 0) ivar->fdunit = 0; child = device_add_child(dev, name, unit); - if (child == NULL) + if (child == NULL) { + free(ivar, M_DEVBUF); return; + } device_set_ivars(child, ivar); if (resource_int_value(name, unit, "flags", &flags) == 0) device_set_flags(child, flags); |
