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
e4a1f86f9c
commit
11443ed5cb
@ -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