avoid sneaky double free
Noticed by: Coverity Prevent analysis tool Reviewed by: scottl
This commit is contained in:
parent
9ad2b03bb5
commit
95526fd399
@ -781,7 +781,11 @@ void hpt_rebuild_data_block(IAL_ADAPTER_T *pAdapter, PVDevice pArray, UCHAR flag
|
||||
|
||||
result = pCmd->Result;
|
||||
FreeCommand(_VBUS_P pCmd);
|
||||
if (buffer) free(buffer, M_DEVBUF);
|
||||
if (buffer) {
|
||||
free(buffer, M_DEVBUF);
|
||||
/* beware of goto retry_cmd below */
|
||||
buffer = NULL;
|
||||
}
|
||||
KdPrintI(("cmd finished %d", result));
|
||||
|
||||
switch(result)
|
||||
|
@ -781,7 +781,11 @@ void hpt_rebuild_data_block(IAL_ADAPTER_T *pAdapter, PVDevice pArray, UCHAR flag
|
||||
|
||||
result = pCmd->Result;
|
||||
FreeCommand(_VBUS_P pCmd);
|
||||
if (buffer) free(buffer, M_DEVBUF);
|
||||
if (buffer) {
|
||||
free(buffer, M_DEVBUF);
|
||||
/* beware of goto retry_cmd below */
|
||||
buffer = NULL;
|
||||
}
|
||||
KdPrintI(("cmd finished %d", result));
|
||||
|
||||
switch(result)
|
||||
|
Loading…
Reference in New Issue
Block a user