mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-08 14:41:51 +00:00
install: fix invalid free() in unit_file_mask()
int unit_file_mask(...) in ./src/shared/install.c calls
get_config_path(...) which can in 4 error cases return without setting
"ret", and thus "prefix" can be uninitialized when unit_file_mask(...)
finishes (which it does directly after the error is returned from
get_config_path(...)).
(cherry picked from commit 223217749e)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
4a6f3f091a
commit
bcb667c211
@@ -565,7 +565,7 @@ int unit_file_mask(
|
||||
unsigned *n_changes) {
|
||||
|
||||
char **i;
|
||||
_cleanup_free_ char *prefix;
|
||||
_cleanup_free_ char *prefix = NULL;
|
||||
int r;
|
||||
|
||||
assert(scope >= 0);
|
||||
|
||||
Reference in New Issue
Block a user