Clean up config on exit

pull/66/head
Andri Yngvason 2020-08-23 13:18:47 +00:00
parent 7ef8d0b0ae
commit dcf3b5869c
2 changed files with 4 additions and 0 deletions

View File

@ -129,11 +129,13 @@ int cfg_load(struct cfg* self, const char* requested_path)
goto failure; goto failure;
} }
free(line);
fclose(stream); fclose(stream);
return 0; return 0;
failure: failure:
cfg_destroy(self); cfg_destroy(self);
free(line);
fclose(stream); fclose(stream);
return lineno; return lineno;
} }

View File

@ -274,6 +274,8 @@ static int init_render_node(int* fd)
void wayvnc_destroy(struct wayvnc* self) void wayvnc_destroy(struct wayvnc* self)
{ {
cfg_destroy(&self->cfg);
output_list_destroy(&self->outputs); output_list_destroy(&self->outputs);
seat_list_destroy(&self->seats); seat_list_destroy(&self->seats);