in the unit tests make sure memory allocated from the pool was returned.

remotes/origin/master-1.0.x
Jason Ish 16 years ago committed by Victor Julien
parent 6547725b39
commit 1aabe6f7c1

@ -1436,6 +1436,14 @@ DefragDoSturgesNovakTest(int policy, u_char *expected, size_t expected_len)
goto end;
free(reassembled);
/* Make sure the tracker was released back to the pool. */
if (dc->tracker_pool->outstanding != 0)
return 0;
/* Make sure all frags were returned back to the pool. */
if (dc->frag_pool->outstanding != 0)
return 0;
ret = 1;
end:
if (dc != NULL)
@ -1619,6 +1627,14 @@ IPV6DefragDoSturgesNovakTest(int policy, u_char *expected, size_t expected_len)
goto end;
free(reassembled);
/* Make sure the tracker was released back to the pool. */
if (dc->tracker_pool->outstanding != 0)
return 0;
/* Make sure all frags were returned to the pool. */
if (dc->frag_pool->outstanding != 0)
return 0;
ret = 1;
end:
if (dc != NULL)

Loading…
Cancel
Save