]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:kdc: Remove unnecessary NULL check
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Sun, 25 Jun 2023 23:11:19 +0000 (11:11 +1200)
committerStefan Metzmacher <metze@samba.org>
Mon, 26 Jun 2023 11:10:31 +0000 (11:10 +0000)
pac_blobs_add_blob() already checks whether the blob argument is NULL,
and skips adding the blob if so.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/kdc/pac-glue.c

index 744ecb332a9753f8e48a863f4d6c7727d913a940..9ddeaa51c24ae72a6ae00f6f75a024b6175ce224 100644 (file)
@@ -2700,14 +2700,12 @@ krb5_error_code samba_kdc_update_pac(TALLOC_CTX *mem_ctx,
                goto done;
        }
 
-       if (device_claims_blob != NULL) {
-               code = pac_blobs_add_blob(&pac_blobs,
-                                         mem_ctx,
-                                         PAC_TYPE_DEVICE_CLAIMS_INFO,
-                                         device_claims_blob);
-               if (code != 0) {
-                       goto done;
-               }
+       code = pac_blobs_add_blob(&pac_blobs,
+                                 mem_ctx,
+                                 PAC_TYPE_DEVICE_CLAIMS_INFO,
+                                 device_claims_blob);
+       if (code != 0) {
+               goto done;
        }
 
        if (!client_pac_is_trusted || !is_tgs) {