summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2016-10-20 18:44:30 +0300
committerMartin Pitt <martin.pitt@ubuntu.com>2016-10-20 17:44:30 +0200
commita5d5c0d2df73fdb31effe1e0f4949508f340bf59 (patch)
tree6d0ed683bfa077ab4c6dafdc5087587f5a18ef85 /src
parentd9a0df256de9fca531afc95cc67a63b4ed1ff180 (diff)
tests: fix memleak in test-calendarspec (#4424)
Fixes: ``` ==10750== ==10750== HEAP SUMMARY: ==10750== in use at exit: 96 bytes in 3 blocks ==10750== total heap usage: 1,711 allocs, 1,708 frees, 854,545 bytes allocated ==10750== ==10750== 96 (64 direct, 32 indirect) bytes in 1 blocks are definitely lost in loss record 3 of 3 ==10750== at 0x4C2DA60: calloc (vg_replace_malloc.c:711) ==10750== by 0x4EB3BDA: calendar_spec_from_string (calendarspec.c:771) ==10750== by 0x109675: test_hourly_bug_4031 (test-calendarspec.c:118) ==10750== by 0x10A00E: main (test-calendarspec.c:202) ==10750== ==10750== LEAK SUMMARY: ==10750== definitely lost: 64 bytes in 1 blocks ==10750== indirectly lost: 32 bytes in 2 blocks ==10750== possibly lost: 0 bytes in 0 blocks ==10750== still reachable: 0 bytes in 0 blocks ==10750== suppressed: 0 bytes in 0 blocks ==10750== ==10750== For counts of detected and suppressed errors, rerun with: -v ==10750== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ```
Diffstat (limited to 'src')
-rw-r--r--src/test/test-calendarspec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test-calendarspec.c b/src/test/test-calendarspec.c
index 752ad0aca8..59217b131c 100644
--- a/src/test/test-calendarspec.c
+++ b/src/test/test-calendarspec.c
@@ -129,6 +129,8 @@ static void test_hourly_bug_4031(void) {
assert_se(u <= n + USEC_PER_HOUR);
assert_se(u < w);
assert_se(w <= u + USEC_PER_HOUR);
+
+ calendar_spec_free(c);
}
int main(int argc, char* argv[]) {