Skip to content

Commit bfeb9b7

Browse files
committed
Fix ASAN warning for Unit_hipGraphRetainUserObject_Functional_1
Signed-off-by: shadi <[email protected]>
1 parent 0ad05ed commit bfeb9b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

projects/clr/hipamd/src/hip_graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2956,7 +2956,7 @@ hipError_t hipUserObjectRelease(hipUserObject_t object, unsigned int count) {
29562956
HIP_RETURN(hipErrorInvalidValue);
29572957
}
29582958
hip::UserObject* userObject = reinterpret_cast<hip::UserObject*>(object);
2959-
if (userObject->referenceCount() < count || !hip::UserObject::isUserObjvalid(userObject)) {
2959+
if (!hip::UserObject::isUserObjvalid(userObject) || userObject->referenceCount() < count) {
29602960
HIP_RETURN(hipSuccess);
29612961
}
29622962
//! If all the counts are gone not longer need the obj in the list

0 commit comments

Comments
 (0)