[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
NetKVM: BZ#1136602 Free allocated object on failure
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Hindin <yhindin@rehat.com>
  • Loading branch information
Joseph Hindin authored and vrozenfe committed Feb 9, 2015
1 parent 9423168 commit 17d4068
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions NetKVM/wlh/ParaNdis6-Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ static NDIS_STATUS ParaNdis6_Initialize(
#if PARANDIS_SUPPORT_RSS
pContext->RSSParameters.rwLock.~CNdisRWLock();
#endif
pContext->m_PauseLock.~CNdisRWLock();

if (pContext->IODevice != nullptr)
NdisFreeMemoryWithTagPriority(pContext->MiniportHandle, pContext->IODevice, PARANDIS_MEMORY_TAG);

NdisFreeMemory(pContext, 0, 0);
pContext = NULL;
Expand Down

0 comments on commit 17d4068

Please sign in to comment.