test: Fix mismatched delete/free