From: Noel Power Date: Wed, 15 Nov 2023 11:29:46 +0000 (+0000) Subject: libcli/security: Debug only when we failed to decode X-Git-Tag: talloc-2.4.2~673 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0d026bdb512b5765f9a8ecc5268fbc238571adc;p=thirdparty%2Fsamba.git libcli/security: Debug only when we failed to decode Signed-off-by: Noel Power Reviewed-by: Andrew Bartlett --- diff --git a/libcli/security/sddl.c b/libcli/security/sddl.c index 2cad84a937a..a4659c107b5 100644 --- a/libcli/security/sddl.c +++ b/libcli/security/sddl.c @@ -995,11 +995,14 @@ struct security_descriptor *sddl_decode(TALLOC_CTX *mem_ctx, const char *sddl, ACE_CONDITION_FLAG_ALLOW_DEVICE, &msg, &msg_offset); - DBG_NOTICE("could not decode '%s'\n", sddl); - if (msg != NULL) { - DBG_NOTICE(" %*c\n", (int)msg_offset, '^'); - DBG_NOTICE("error '%s'\n", msg); - talloc_free(discard_const(msg)); + if (sd == NULL) { + DBG_NOTICE("could not decode '%s'\n", sddl); + if (msg != NULL) { + DBG_NOTICE(" %*c\n", + (int)msg_offset, '^'); + DBG_NOTICE("error '%s'\n", msg); + talloc_free(discard_const(msg)); + } } return sd; }