mirror of
https://github.com/systemd/systemd.git
synced 2026-07-27 03:39:09 +00:00
Merge pull request #6311 from keszybz/memleak
Fix trivial memleak in sd-login code
This commit is contained in:
@@ -878,7 +878,8 @@ _public_ int sd_get_uids(uid_t **users) {
|
||||
}
|
||||
|
||||
_public_ int sd_get_machine_names(char ***machines) {
|
||||
char **l, **a, **b;
|
||||
_cleanup_strv_free_ char **l = NULL;
|
||||
char **a, **b;
|
||||
int r;
|
||||
|
||||
r = get_files_in_directory("/run/systemd/machines/", &l);
|
||||
@@ -907,8 +908,10 @@ _public_ int sd_get_machine_names(char ***machines) {
|
||||
*b = NULL;
|
||||
}
|
||||
|
||||
if (machines)
|
||||
if (machines) {
|
||||
*machines = l;
|
||||
l = NULL;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ static int ipv4ll_address_handler(sd_netlink *rtnl, sd_netlink_message *m, void
|
||||
|
||||
link->ipv4ll_address = true;
|
||||
|
||||
if (link->ipv4ll_route == true)
|
||||
if (link->ipv4ll_route)
|
||||
link_check_ready(link);
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user