Merge pull request #3551 from c-edw/RevertDoubleFrees

Revert double frees.
This commit is contained in:
Drew DeVault 2019-02-03 09:55:54 +01:00 committed by GitHub
commit bbfe13a248
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 9 deletions

View file

@ -46,7 +46,6 @@ void free_bar_config(struct bar_config *bar) {
free(bar->position);
free(bar->hidden_state);
free(bar->status_command);
free(bar->swaybar_command);
free(bar->font);
free(bar->separator_symbol);
for (int i = 0; i < bar->bindings->length; i++) {

View file

@ -402,6 +402,5 @@ void free_output_config(struct output_config *oc) {
free(oc->name);
free(oc->background);
free(oc->background_option);
free(oc->background_fallback);
free(oc);
}

View file

@ -35,19 +35,18 @@ bool criteria_is_empty(struct criteria *criteria) {
}
void criteria_destroy(struct criteria *criteria) {
free(criteria->raw);
free(criteria->cmdlist);
free(criteria->target);
pcre_free(criteria->title);
pcre_free(criteria->shell);
pcre_free(criteria->app_id);
pcre_free(criteria->con_mark);
#if HAVE_XWAYLAND
pcre_free(criteria->class);
pcre_free(criteria->instance);
pcre_free(criteria->window_role);
#endif
pcre_free(criteria->con_mark);
free(criteria->workspace);
free(criteria->cmdlist);
free(criteria->raw);
free(criteria);
}

View file

@ -108,7 +108,6 @@ void free_config(struct swaybar_config *config) {
free(config->mode);
free(config->hidden_state);
free(config->sep_symbol);
free(config->modifier);
for (int i = 0; i < config->bindings->length; i++) {
struct swaybar_binding *binding = config->bindings->items[i];
free_binding(binding);

View file

@ -182,8 +182,6 @@ void status_line_free(struct status_line *status) {
}
json_tokener_free(status->tokener);
}
free(status->read);
free(status->write);
free(status->buffer);
free(status);
}