mirror of
https://github.com/i3/i3.git
synced 2025-10-29 11:25:59 +00:00
randr: Fix memleak (#6505)
`sasprintf` always allocates `oname` but it is only conditionally freed. Note: Found with [bugfinder](https://github.com/stanek-michal/bugfinder)
This commit is contained in:
parent
b3329fbb02
commit
389cf064e6
@ -660,9 +660,8 @@ static bool randr_query_outputs_15(void) {
|
||||
struct output_name *output_name = scalloc(1, sizeof(struct output_name));
|
||||
output_name->name = sstrdup(oname);
|
||||
SLIST_INSERT_HEAD(&new->names_head, output_name, names);
|
||||
} else {
|
||||
free(oname);
|
||||
}
|
||||
free(oname);
|
||||
}
|
||||
FREE(info);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user