bar: free old position when changing

master
Ian Fan 6 years ago
parent 87334dbccb
commit ba8981e44b

@ -17,6 +17,7 @@ struct cmd_results *bar_cmd_position(int argc, char **argv) {
if (strcasecmp(valid[i], argv[0]) == 0) {
wlr_log(WLR_DEBUG, "Setting bar position '%s' for bar: %s",
argv[0], config->current_bar->id);
free(config->current_bar->position);
config->current_bar->position = strdup(argv[0]);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
}

Loading…
Cancel
Save