summaryrefslogtreecommitdiffstats
path: root/src/home/user-record-util.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-01-31 15:08:53 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-01-31 15:08:59 +0100
commit02cec15629629de45237ad63fc42530245842385 (patch)
treecc127ed96d06d8b133a489a06049d357f6deb8bd /src/home/user-record-util.c
parenthomework: fix errno in log_error_errno() (diff)
downloadsystemd-02cec15629629de45237ad63fc42530245842385.tar.xz
systemd-02cec15629629de45237ad63fc42530245842385.zip
user-record-util: add missing error check
Fixes CID#1415123.
Diffstat (limited to 'src/home/user-record-util.c')
-rw-r--r--src/home/user-record-util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/home/user-record-util.c b/src/home/user-record-util.c
index cb840f910b..34f9d76cb2 100644
--- a/src/home/user-record-util.c
+++ b/src/home/user-record-util.c
@@ -737,6 +737,8 @@ int user_record_make_hashed_password(UserRecord *h, char **secret, bool extend)
return r;
r = json_variant_set_field(&priv, "hashedPassword", new_array);
+ if (r < 0)
+ return r;
}
r = json_variant_set_field(&h->json, "privileged", priv);