mirror of
https://github.com/swaywm/sway.git
synced 2026-04-21 06:46:22 -04:00
Fix memory leak
This commit is contained in:
parent
3061999ec5
commit
ca641d9d1a
1 changed files with 2 additions and 1 deletions
|
|
@ -29,7 +29,7 @@ int main(int argc, char **argv) {
|
||||||
wl_list_init(&swaynag.outputs);
|
wl_list_init(&swaynag.outputs);
|
||||||
wl_list_init(&swaynag.seats);
|
wl_list_init(&swaynag.seats);
|
||||||
|
|
||||||
struct swaynag_button button_close = { 0 };
|
static struct swaynag_button button_close = { 0 };
|
||||||
button_close.text = strdup("X");
|
button_close.text = strdup("X");
|
||||||
button_close.type = SWAYNAG_ACTION_DISMISS;
|
button_close.type = SWAYNAG_ACTION_DISMISS;
|
||||||
list_add(swaynag.buttons, &button_close);
|
list_add(swaynag.buttons, &button_close);
|
||||||
|
|
@ -115,6 +115,7 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
swaynag_types_free(types);
|
swaynag_types_free(types);
|
||||||
|
free(button_close.text);
|
||||||
free(swaynag.details.button_details.text);
|
free(swaynag.details.button_details.text);
|
||||||
swaynag_destroy(&swaynag);
|
swaynag_destroy(&swaynag);
|
||||||
return status;
|
return status;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue