Skip to content

Commit

Permalink
Upmerge branch 'upstream/candidate-1.2.0' into candidate-1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jamienoss committed May 22, 2017
2 parents 5f583fe + 18612f4 commit f0c1770
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hstio/hstio.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,17 @@ void freePtr(PtrRegister * reg, void * ptr)
return;

int i;
Bool found = False;
for (i = reg->cursor; i > 0 ; --i)
{
if (reg->ptrs[i] == ptr)
{
found = True;
break;
}
}
if (!found)
assert(0); //internal error: the ptr trying to be freed was not added to the register

//call function to free ptr
reg->freeFunctions[i](ptr);
Expand Down

0 comments on commit f0c1770

Please sign in to comment.