Skip to content

Commit 693f2dc

Browse files
committed
IntelBTPatcher: Free and reassign owner wrapper data if the interrupt pipe is reinit.
1 parent 18fcde3 commit 693f2dc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

IntelBTPatcher/IntelBTPatcher.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ newInitPipe(void *that, StandardUSB::EndpointDescriptor const *descriptor, Stand
329329
SYSLOG(DRV_NAME, "GOT YOU Interrupt PIPE");
330330
CIntelBTPatcher::_hookPipeInstance = that;
331331
if (!CIntelBTPatcher::_interruptPipeAsyncOwner)
332-
CIntelBTPatcher::_interruptPipeAsyncOwner = new AsyncOwnerData;
332+
delete CIntelBTPatcher::_interruptPipeAsyncOwner;
333+
CIntelBTPatcher::_interruptPipeAsyncOwner = new AsyncOwnerData;
333334
CIntelBTPatcher::_randomAddressInit = false;
334335
}
335336
}

0 commit comments

Comments
 (0)