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) ```
This commit is contained in:
parent
d9a0df256d
commit
a5d5c0d2df
|
@ -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[]) {
|
||||
|
|
Loading…
Reference in a new issue