mirror of
https://github.com/opnsense/src.git
synced 2026-04-27 00:58:36 -04:00
Fix bad free() usage.
Submitted by: Pawel Jakub Dawidek
This commit is contained in:
parent
8b4447cb2a
commit
ed0c8a7dc7
1 changed files with 8 additions and 2 deletions
|
|
@ -1340,7 +1340,8 @@ ar_highpoint_write_conf(struct ar_softc *rdp)
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
free(config, M_AR);
|
||||
else
|
||||
free(config, M_AR);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1512,6 +1513,7 @@ ar_lsi_write_conf(struct ar_softc *rdp)
|
|||
break;
|
||||
|
||||
default:
|
||||
free(config, M_AR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -1548,9 +1550,12 @@ ar_lsi_write_conf(struct ar_softc *rdp)
|
|||
sizeof(struct lsi_raid_conf),
|
||||
(caddr_t)config, AR_WRITE)) {
|
||||
printf("ar%d: LSI write conf failed\n", rdp->lun);
|
||||
free(config, M_AR);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
free(config, M_AR);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1849,7 +1854,8 @@ ar_promise_write_conf(struct ar_softc *rdp)
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
free(config, M_AR);
|
||||
else
|
||||
free(config, M_AR);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue