diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/profiles.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/utils/profiles.c b/source3/utils/profiles.c index a193582387c..0f274ad604a 100644 --- a/source3/utils/profiles.c +++ b/source3/utils/profiles.c @@ -130,11 +130,12 @@ static bool copy_registry_tree( REGF_FILE *infile, REGF_NK_REC *nk, /* swap out the SIDs in the security descriptor */ if (nk->sec_desc->sec_desc == NULL) { - new_sd = NULL; - } else { - new_sd = security_descriptor_copy(outfile->mem_ctx, - nk->sec_desc->sec_desc); + fprintf(stderr, "Invalid (NULL) security descriptor!\n"); + return false; } + + new_sd = security_descriptor_copy(outfile->mem_ctx, + nk->sec_desc->sec_desc); if (new_sd == NULL) { fprintf(stderr, "Failed to copy security descriptor!\n"); return False; |