diff options
| author | Sanjeev Reddy <[email protected]> | 2017-03-09 17:18:02 -0800 |
|---|---|---|
| committer | Sanjeev Reddy <[email protected]> | 2017-03-09 17:18:02 -0800 |
| commit | e4581d8cd1bcc5108786b082a1ec24007a508847 (patch) | |
| tree | 1f49cee3db80a5c7aa7e8c495bf0395ec459730c /AVStream/avscamera/sys/Device.cpp | |
| parent | 1098c82e7d71d3f47157e0837cb939203f944939 (diff) | |
Fix OACR code analysis warnings
Diffstat (limited to 'AVStream/avscamera/sys/Device.cpp')
| -rw-r--r-- | AVStream/avscamera/sys/Device.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/AVStream/avscamera/sys/Device.cpp b/AVStream/avscamera/sys/Device.cpp index 107cdafc..1b5f8090 100644 --- a/AVStream/avscamera/sys/Device.cpp +++ b/AVStream/avscamera/sys/Device.cpp @@ -700,7 +700,7 @@ Return Value: // Publish our profile here. uiProfileCount = InitializeDeviceProfiles(fFrontCamera, &pDeviceProfiles); - if( uiProfileCount > 0 ) + if( uiProfileCount > 0 && pDeviceProfiles != nullptr) { if( NT_SUCCESS(KsInitializeDeviceProfile(FilterFactory)) ) { @@ -721,6 +721,10 @@ Return Value: ExFreePool(pDeviceProfiles); pDeviceProfiles = NULL; } + else + { + IFFAILED_EXIT(STATUS_INSUFFICIENT_RESOURCES); + } } // On a real device this object would be constructed whenever the sensor hardware is ready... |
