]> git.ipfire.org Git - thirdparty/systemd.git/commit
tests: fix memleak in test-calendarspec (#4424)
authorEvgeny Vereshchagin <evvers@ya.ru>
Thu, 20 Oct 2016 15:44:30 +0000 (18:44 +0300)
committerMartin Pitt <martin.pitt@ubuntu.com>
Thu, 20 Oct 2016 15:44:30 +0000 (17:44 +0200)
commita5d5c0d2df73fdb31effe1e0f4949508f340bf59
tree6d0ed683bfa077ab4c6dafdc5087587f5a18ef85
parentd9a0df256de9fca531afc95cc67a63b4ed1ff180
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)
```
src/test/test-calendarspec.c