Two fixes for homectl (#39591)

This commit is contained in:
Yu Watanabe
2025-11-07 05:52:20 +09:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -3887,7 +3887,7 @@ static int parse_argv(int argc, char *argv[]) {
break;
case ARG_SETENV: {
_cleanup_free_ char **l = NULL;
_cleanup_strv_free_ char **l = NULL;
_cleanup_(sd_json_variant_unrefp) sd_json_variant *ne = NULL;
sd_json_variant *e;

View File

@@ -1133,6 +1133,8 @@ static int ask_password_credential(const AskPasswordRequest *req, AskPasswordFla
r = read_credential(req->credential, (void**) &buffer, &size);
if (IN_SET(r, -ENXIO, -ENOENT)) /* No credentials passed or this credential not defined? */
return -ENOKEY;
if (r < 0)
return r;
l = strv_parse_nulstr(buffer, size);
if (!l)