Permalink
Browse files

fix mem leak

  • Loading branch information...
1 parent 036c1f7 commit f8356903aff4eb3ce87f3b5620a8205ee5f7be9c @believe3301 committed Sep 19, 2012
Showing with 3 additions and 0 deletions.
  1. +1 −0 lru.c
  2. +2 −0 test/test.c
View
1 lru.c
@@ -273,4 +273,5 @@ lru_free(lru *l)
assert(l->tail == NULL);
//free hashtable
free(l->table);
+ free(l);
}
View
@@ -177,6 +177,8 @@ static enum test_return lru_stat_test(void) {
stat_print(l, buf, sizeof(buf));
printf("%s\n", buf);
+ lru_free(l);
+
return TEST_PASS;
}

0 comments on commit f835690

Please sign in to comment.