SWDEV-344440 SWDEV-344433 - null ptr checks for hipMemPoolGetAttribute hipMemPoolSetAttribute
Change-Id: I812abb3c74a05c4ec9097b09ee7e9a86b0c91e9b
Ta zmiana jest zawarta w:
%! (template.HTML=
Ajay)złożyło 2022-07-05 18:42:34 +00:00
1 rodzic
62069a5ae8
złożenie
36a85741de
Plik 1 zmieniony
+2
-2
@@ -102,7 +102,7 @@ hipError_t hipMemPoolTrimTo(hipMemPool_t mem_pool, size_t min_bytes_to_hold) {
|
||||
// ================================================================================================
|
||||
hipError_t hipMemPoolSetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void* value) {
|
||||
HIP_INIT_API(hipMemPoolSetAttribute, mem_pool, attr, value);
|
||||
if (mem_pool == nullptr) {
|
||||
if (mem_pool == nullptr || value == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
auto hip_mem_pool = reinterpret_cast<hip::MemoryPool*>(mem_pool);
|
||||
@@ -112,7 +112,7 @@ hipError_t hipMemPoolSetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, vo
|
||||
// ================================================================================================
|
||||
hipError_t hipMemPoolGetAttribute(hipMemPool_t mem_pool, hipMemPoolAttr attr, void* value) {
|
||||
HIP_INIT_API(hipMemPoolGetAttribute, mem_pool, attr, value);
|
||||
if (mem_pool == nullptr) {
|
||||
if (mem_pool == nullptr || value == nullptr) {
|
||||
HIP_RETURN(hipErrorInvalidValue);
|
||||
}
|
||||
auto hip_mem_pool = reinterpret_cast<hip::MemoryPool*>(mem_pool);
|
||||
|
||||
Reference in new issue
Zablokuj użytkownika