Address Valgrind warnings during unit tests

This commit is contained in:
Andrew Gaul 2019-10-30 16:04:33 -07:00
parent abda2b8901
commit 110ccb5814

View file

@ -146,6 +146,7 @@ static const char *test_settings()
t_fans* fan2 = (t_fans *)malloc(sizeof(t_fans));
fan2->fan_id = 2;
fan2->fan_max_speed = -1;
fan2->next = NULL;
fan->next = fan2;
retrieve_settings("./mbpfan.conf.test2", fan);
@ -194,6 +195,7 @@ static const char *test_settings_reload()
{
t_fans* fan = (t_fans *) malloc( sizeof( t_fans ) );
fan->fan_id = 1;
fan->fan_min_speed = -1;
fan->next = NULL;
signal(SIGHUP, handler);