summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcli/security/dom_sid.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libcli/security/dom_sid.c b/libcli/security/dom_sid.c
index 90f54018d9..836979e450 100644
--- a/libcli/security/dom_sid.c
+++ b/libcli/security/dom_sid.c
@@ -414,6 +414,9 @@ char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
* the length
*/
result = (char *)talloc_memdup(mem_ctx, buf, len+1);
+ if (result == NULL) {
+ return NULL;
+ }
/*
* beautify the talloc_report output