Title: #222: ipa_s2n_get_acct_info_send: provide correct req_input name
pbrezina commented:
"""
On 04/03/2017 12:43 PM, sumit-bose wrote:
*@sumit-bose* commented on this pull request.
------------------------------------------------------------------------
In src/providers/ipa/ipa_s2n_exop.c
<
https://github.com/SSSD/sssd/pull/222#discussion_r109386584>:
> @@ -1454,10 +1482,11 @@ struct tevent_req *ipa_s2n_get_acct_info_send(TALLOC_CTX
*mem_ctx,
goto fail;
}
- DEBUG(SSSDBG_TRACE_FUNC, "Sending request_type: [%s] for trust user [%s]
"
- "to IPA server\n",
- ipa_s2n_reqtype2str(state->request_type),
- req_input->inp.name);
+ input = ipa_s2n_reqinp2str(state, req_input);
+ DEBUG(SSSDBG_TRACE_FUNC, "Sending request_type: [%s] for trust user "
+ "[%s] to IPA server\n",
ipa_s2n_reqtype2str(state->request_type),
+ input);
+ talloc_zfree(input);
ipa_s2n_reqinp2str() should only be called if input is needed. Se I
would recommend to either wrap the debug block in a 'if
(DEBUG_IS_SET(SSSDBG_TRACE_FUNC))' or move ipa_s2n_reqinp2str() into the
DEBUG() macro and drop the individual talloc_free() here.
I though about it but choose not to since it is a trivial function. But
I updated the patch with `DEBUG_IS_SET`
"""
See the full comment at