Skip to content

Commit

Permalink
fix #547 Regression in Unit_hipFreeNegativeArray
Browse files Browse the repository at this point in the history
  • Loading branch information
franz committed Jul 17, 2023
1 parent 85d0b91 commit 0f646a3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CHIPBindings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2876,7 +2876,10 @@ hipError_t hipArrayCreate(hipArray **Array,
hipError_t hipFreeArray(hipArray *Array) {
CHIP_TRY
CHIPInitialize();
if (!Array || !Array->data)
if (!Array)
RETURN(hipErrorInvalidValue);

if (!Array->data)
RETURN(hipErrorContextIsDestroyed);

hipError_t Err = hipFreeInternal(Array->data);
Expand Down

0 comments on commit 0f646a3

Please sign in to comment.