mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
MFC: r198356
Fix a memory leak in an error case.
This commit is contained in:
parent
b7ef6e29a5
commit
ce68852cc2
1 changed files with 3 additions and 0 deletions
|
|
@ -638,7 +638,10 @@ scsi_low_attach_xs(slp)
|
|||
return ENOMEM;
|
||||
splp = SCSI_LOW_MALLOC(sizeof(*splp));
|
||||
if (splp == NULL)
|
||||
{
|
||||
SCSI_LOW_FREE(sap);
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
SCSI_LOW_BZERO(sap, sizeof(*sap));
|
||||
SCSI_LOW_BZERO(splp, sizeof(*splp));
|
||||
|
|
|
|||
Loading…
Reference in a new issue