1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-03 01:18:10 +03:00

nsswitch: move winbindd_free_response() as inline function to winbind_struct_protocol.h

nsswitch/wb_common.c will be made completely internal soon.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14780

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Stefan Metzmacher 2021-11-22 18:11:27 +01:00
parent f3c5980f76
commit 41108b9ed9
3 changed files with 10 additions and 11 deletions

View File

@ -67,16 +67,6 @@ static void put_wb_global_ctx(void)
return;
}
/* Free a response structure */
void winbindd_free_response(struct winbindd_response *response)
{
/* Free any allocated extra_data */
if (response)
SAFE_FREE(response->extra_data.data);
}
void winbind_set_client_name(const char *name)
{
if (name == NULL || strlen(name) == 0) {

View File

@ -34,7 +34,6 @@ struct winbindd_context;
struct winbindd_context *winbindd_ctx_create(void);
void winbindd_ctx_free(struct winbindd_context *ctx);
void winbindd_free_response(struct winbindd_response *response);
NSS_STATUS winbindd_request_response(struct winbindd_context *ctx,
int req_type,
struct winbindd_request *request,

View File

@ -522,4 +522,14 @@ struct winbindd_response {
} extra_data;
};
/* Free a response structure */
static inline void winbindd_free_response(struct winbindd_response *response)
{
/* Free any allocated extra_data */
if (response)
SAFE_FREE(response->extra_data.data);
}
#endif