mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
rcxml: add rcxml_finish()
This commit is contained in:
parent
c6c73366d2
commit
68fb8a3af5
5 changed files with 28 additions and 0 deletions
3
asan_suppressions.txt
Normal file
3
asan_suppressions.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
leak:libfontconfig
|
||||
leak:libglib-2.0
|
||||
|
||||
|
|
@ -20,6 +20,7 @@ extern struct rcxml rc;
|
|||
|
||||
void rcxml_parse_xml(struct buf *b);
|
||||
void rcxml_read(const char *filename);
|
||||
void rcxml_finish(void);
|
||||
void rcxml_get_nodenames(struct buf *b);
|
||||
|
||||
#endif /* __LABWC_RCXML_H */
|
||||
|
|
|
|||
|
|
@ -295,6 +295,28 @@ out:
|
|||
post_processing();
|
||||
}
|
||||
|
||||
static void free_safe(const void *p)
|
||||
{
|
||||
if (p)
|
||||
free((void *)p);
|
||||
p = NULL;
|
||||
}
|
||||
|
||||
void rcxml_finish(void)
|
||||
{
|
||||
free_safe(rc.font_name_activewindow);
|
||||
free_safe(rc.theme_name);
|
||||
|
||||
struct keybind *k, *k_tmp;
|
||||
wl_list_for_each_safe (k, k_tmp, &rc.keybinds, link) {
|
||||
wl_list_remove(&k->link);
|
||||
free_safe(k->command);
|
||||
free_safe(k->action);
|
||||
free_safe(k->keysyms);
|
||||
free_safe(k);
|
||||
}
|
||||
}
|
||||
|
||||
void rcxml_get_nodenames(struct buf *b)
|
||||
{
|
||||
write_to_nodename_buffer = true;
|
||||
|
|
|
|||
|
|
@ -59,5 +59,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
wl_display_run(server.wl_display);
|
||||
server_finish(&server);
|
||||
rcxml_finish();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,5 +33,6 @@ int main(int argc, char **argv)
|
|||
diag("Simple parse rc.xml");
|
||||
ok1(rc.client_side_decorations);
|
||||
|
||||
rcxml_finish();
|
||||
return exit_status();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue