Merge pull request #6311 from keszybz/memleak

Fix trivial memleak in sd-login code
This commit is contained in:
Djalal Harouni
2017-07-09 17:58:52 +02:00
committed by GitHub
2 changed files with 6 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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;