Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Delete sub layer in case of failure
Browse files Browse the repository at this point in the history
AvivShabtay committed Jan 26, 2022
1 parent f0adcda commit 55eb668
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions network/trans/inspect/sys/TL_drv.c
Original file line number Diff line number Diff line change
@@ -507,6 +507,7 @@ TLInspectRegisterCallouts(

BOOLEAN engineOpened = FALSE;
BOOLEAN inTransaction = FALSE;
BOOLEAN sublayerCreated = FALSE;

FWPM_SESSION session = {0};

@@ -549,6 +550,8 @@ TLInspectRegisterCallouts(
{
goto Exit;
}

sublayerCreated = TRUE;

if (configInspectRemoteAddrV4 != NULL)
{
@@ -655,6 +658,10 @@ TLInspectRegisterCallouts(

if (!NT_SUCCESS(status))
{
if (sublayerCreated)
{
FwpmSubLayerDeleteByKey(gEngineHandle, &TL_INSPECT_SUBLAYER);
}
if (inTransaction)
{
FwpmTransactionAbort(gEngineHandle);

0 comments on commit 55eb668

Please sign in to comment.