summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
Diffstat (limited to 'libcli')
-rw-r--r--libcli/security/util_sid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcli/security/util_sid.c b/libcli/security/util_sid.c
index 535e81cbdb..cf1f7f368f 100644
--- a/libcli/security/util_sid.c
+++ b/libcli/security/util_sid.c
@@ -167,7 +167,9 @@ bool sid_split_rid(struct dom_sid *sid, uint32_t *rid)
{
if (sid->num_auths > 0) {
sid->num_auths--;
- *rid = sid->sub_auths[sid->num_auths];
+ if (rid != NULL) {
+ *rid = sid->sub_auths[sid->num_auths];
+ }
return true;
}
return false;