diff options
| author | David Spruill <[email protected]> | 2026-01-08 17:51:47 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-08 17:51:47 -0500 |
| commit | c5fc3ca1fd0e00a7e085ef48abfeff9c0c39817e (patch) | |
| tree | 0e650a0fee8027816bbea82ca1fd9b8e3e6ee24a /audio/simpleaudiosample/Source/Main/common.cpp | |
| parent | f88e4fbbd4d2671e5cd77e4f60be7a235326797e (diff) | |
| parent | ed3dbe56378117a15105099870f2397671ad99ab (diff) | |
Merge branch 'develop' into user/daspr/kmodsamplefix
Diffstat (limited to 'audio/simpleaudiosample/Source/Main/common.cpp')
| -rw-r--r-- | audio/simpleaudiosample/Source/Main/common.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/simpleaudiosample/Source/Main/common.cpp b/audio/simpleaudiosample/Source/Main/common.cpp index 457bdb17..7c19130e 100644 --- a/audio/simpleaudiosample/Source/Main/common.cpp +++ b/audio/simpleaudiosample/Source/Main/common.cpp @@ -2511,7 +2511,7 @@ Return Value: // Allocate the key value name string pwstrKeyValueName = (PWSTR)ExAllocatePool2(POOL_FLAG_NON_PAGED, kvFullInfo->NameLength + sizeof(WCHAR)*2, MINADAPTER_POOLTAG); - IF_TRUE_ACTION_JUMP(kvFullInfo == NULL, ntStatus = STATUS_INSUFFICIENT_RESOURCES, loop_exit); + IF_TRUE_ACTION_JUMP(pwstrKeyValueName == NULL, ntStatus = STATUS_INSUFFICIENT_RESOURCES, loop_exit); // Copy the key value name from the full information struct RtlStringCbCopyNW(pwstrKeyValueName, kvFullInfo->NameLength + sizeof(WCHAR)*2, kvFullInfo->Name, kvFullInfo->NameLength); @@ -2531,6 +2531,7 @@ Return Value: if (pwstrKeyValueName) { ExFreePoolWithTag(pwstrKeyValueName, MINADAPTER_POOLTAG); + pwstrKeyValueName = NULL; } // Bail if anything failed @@ -2618,7 +2619,7 @@ Return Value: // Allocate the key name string pwstrKeyName = (PWSTR)ExAllocatePool2(POOL_FLAG_NON_PAGED, kBasicInfo->NameLength + sizeof(WCHAR), MINADAPTER_POOLTAG); - IF_TRUE_ACTION_JUMP(kBasicInfo == NULL, ntStatus = STATUS_INSUFFICIENT_RESOURCES, loop_exit); + IF_TRUE_ACTION_JUMP(pwstrKeyName == NULL, ntStatus = STATUS_INSUFFICIENT_RESOURCES, loop_exit); // Copy the key name from the basic information struct RtlStringCbCopyNW(pwstrKeyName, kBasicInfo->NameLength + sizeof(WCHAR), kBasicInfo->Name, kBasicInfo->NameLength); @@ -2652,6 +2653,7 @@ Return Value: if (pwstrKeyName) { ExFreePoolWithTag(pwstrKeyName, MINADAPTER_POOLTAG); + pwstrKeyName = NULL; } // Close the current source key |
