diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-13 08:47:22 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-14 11:38:09 +1000 |
commit | 39007fc30fa3619f14087d138acb8a49114631c3 (patch) | |
tree | f992e5ac8576c5df686aabb414406aa5c90f8319 /sway/criteria.c | |
parent | Revert "Revert "Merge pull request #1953 from RyanDwyer/criteria-focused"" (diff) | |
download | sway-39007fc30fa3619f14087d138acb8a49114631c3.tar.gz sway-39007fc30fa3619f14087d138acb8a49114631c3.tar.zst sway-39007fc30fa3619f14087d138acb8a49114631c3.zip |
Fix double free in criteria
Diffstat (limited to 'sway/criteria.c')
-rw-r--r-- | sway/criteria.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sway/criteria.c b/sway/criteria.c index 294b2922..286ccc3b 100644 --- a/sway/criteria.c +++ b/sway/criteria.c | |||
@@ -417,10 +417,9 @@ static void unescape(char *value) { | |||
417 | * criteria struct. | 417 | * criteria struct. |
418 | * | 418 | * |
419 | * If errors are found, NULL will be returned and the error argument will be | 419 | * If errors are found, NULL will be returned and the error argument will be |
420 | * populated with an error string. | 420 | * populated with an error string. It is up to the caller to free the error. |
421 | */ | 421 | */ |
422 | struct criteria *criteria_parse(char *raw, char **error_arg) { | 422 | struct criteria *criteria_parse(char *raw, char **error_arg) { |
423 | free(error); | ||
424 | error = NULL; | 423 | error = NULL; |
425 | 424 | ||
426 | char *head = raw; | 425 | char *head = raw; |