reload: fix memory leak
This commit is contained in:
@ -169,6 +169,10 @@ void load_configuration(xcb_connection_t *conn, const char *override_configpath,
|
||||
|
||||
/* Get rid of the current font */
|
||||
free_font();
|
||||
|
||||
free(config.ipc_socket_path);
|
||||
free(config.restart_state_path);
|
||||
free(config.fake_outputs);
|
||||
}
|
||||
|
||||
SLIST_INIT(&modes);
|
||||
|
@ -261,6 +261,7 @@ CFGFUN(workspace_back_and_forth, const char *value) {
|
||||
}
|
||||
|
||||
CFGFUN(fake_outputs, const char *outputs) {
|
||||
free(config.fake_outputs);
|
||||
config.fake_outputs = sstrdup(outputs);
|
||||
}
|
||||
|
||||
@ -313,10 +314,12 @@ CFGFUN(workspace, const char *workspace, const char *output) {
|
||||
}
|
||||
|
||||
CFGFUN(ipc_socket, const char *path) {
|
||||
free(config.ipc_socket_path);
|
||||
config.ipc_socket_path = sstrdup(path);
|
||||
}
|
||||
|
||||
CFGFUN(restart_state, const char *path) {
|
||||
free(config.restart_state_path);
|
||||
config.restart_state_path = sstrdup(path);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user