Don't free k_cfg until we're finished using it -- reverse the order of
two free commands. Reported by: "Ted Unangst" <tedu@coverity.com> Approved by: rwatson (mentor), scottl
This commit is contained in:
parent
caa32ef5c2
commit
1f0c8eae54
@ -515,9 +515,9 @@ raidctlioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct thread *td)
|
||||
(caddr_t) specific_buf,
|
||||
k_cfg->layoutSpecificSize);
|
||||
if (retcode) {
|
||||
RF_Free(k_cfg, sizeof(RF_Config_t));
|
||||
RF_Free(specific_buf,
|
||||
k_cfg->layoutSpecificSize);
|
||||
RF_Free(k_cfg, sizeof(RF_Config_t));
|
||||
rf_printf(2, "raidctlioctl: retcode=%d "
|
||||
"copyin.2\n", retcode);
|
||||
return (retcode);
|
||||
|
Loading…
Reference in New Issue
Block a user