mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-01-06 15:20:28 +01:00
test: fix a memleak in the unit tests
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
6d46c55df3
commit
119b9c74b0
1 changed files with 3 additions and 1 deletions
|
|
@ -5,6 +5,8 @@
|
|||
#include <sys/socket.h>
|
||||
#include <munit.h>
|
||||
|
||||
#include "util-mem.h"
|
||||
|
||||
extern const MunitSuite __start_test_section, __stop_test_section;
|
||||
|
||||
int
|
||||
|
|
@ -12,7 +14,7 @@ main(int argc, char* argv[MUNIT_ARRAY_PARAM(argc + 1)])
|
|||
{
|
||||
size_t sz = 10;
|
||||
size_t count = 0;
|
||||
MunitSuite *suites = calloc(sz, sizeof(*suites));
|
||||
_cleanup_free_ MunitSuite *suites = calloc(sz, sizeof(*suites));
|
||||
|
||||
for (const MunitSuite *s = &__start_test_section;
|
||||
s < &__stop_test_section;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue