]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
user-record-util: add missing error check
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 31 Jan 2020 14:08:53 +0000 (23:08 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 31 Jan 2020 14:08:59 +0000 (23:08 +0900)
Fixes CID#1415123.

src/home/user-record-util.c

index cb840f910b2d335fb5f469f288f643cb1e9b4efc..34f9d76cb262046353640e5416fcdc88f9293033 100644 (file)
@@ -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);