dsdb: Fix CID 1436918 Unchecked return value
authorVolker Lendecke <vl@samba.org>
Tue, 12 Jun 2018 19:15:55 +0000 (21:15 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 13 Jun 2018 08:30:15 +0000 (10:30 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/tests/test_group_audit.c

index 26392b7836238edd994f53556241d0b88ef83a09..2c32b658a21a4c2daa4cca5db74a7cf7141605ff 100644 (file)
@@ -189,11 +189,13 @@ static void add_session_data(
        struct security_token *token = NULL;
        struct dom_sid *sid = NULL;
        struct GUID session_id;
+       bool ok;
 
        sess = talloc_zero(ctx, struct auth_session_info);
        token = talloc_zero(ctx, struct security_token);
        sid = talloc_zero(ctx, struct dom_sid);
-       string_to_sid(sid, user_sid);
+       ok = string_to_sid(sid, user_sid);
+       assert_true(ok);
        token->sids = sid;
        sess->security_token = token;
        GUID_from_string(session, &session_id);