desktop-shell: Add missing weston_config_destroy() for desktop.config

desktop.config sections could be freed after it's use. This will avoid
memory leak.

Signed-off-by: Anurup M <anurup.mokkil@gmail.com>
This commit is contained in:
Anurup M 2020-11-25 06:35:40 +05:30
parent a86b590fea
commit c640cb600d
1 changed files with 2 additions and 0 deletions

View File

@ -1526,6 +1526,7 @@ int main(int argc, char *argv[])
if (desktop.display == NULL) {
fprintf(stderr, "failed to create display: %s\n",
strerror(errno));
weston_config_destroy(desktop.config);
return -1;
}
@ -1554,6 +1555,7 @@ int main(int argc, char *argv[])
unlock_dialog_destroy(desktop.unlock_dialog);
weston_desktop_shell_destroy(desktop.shell);
display_destroy(desktop.display);
weston_config_destroy(desktop.config);
return 0;
}