Permalink
Browse files

bencodetest: Make sure all memory is freed [PERFECTIVE]

  • Loading branch information...
1 parent ea4bc27 commit e388110ab80c30230ef082d6ae3dbe67d3230b33 Janne Kulmala committed May 4, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 bencodetest.c
View
@@ -1199,6 +1199,7 @@ void pack_tests(void)
assert(encoded != NULL);
assert(len == strlen(s));
assert(memcmp(encoded, s, len) == 0);
+ ben_free(b);
free(encoded);
b = ben_pack("[%s, 'spam.mp3', False]", "Alice");
@@ -1208,6 +1209,7 @@ void pack_tests(void)
assert(encoded != NULL);
assert(len == strlen(s2));
assert(memcmp(encoded, s2, len) == 0);
+ ben_free(b);
free(encoded);
}

0 comments on commit e388110

Please sign in to comment.