diff options
author | Stefan Metzmacher <metze@samba.org> | 2021-11-22 18:11:27 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2021-11-30 15:53:34 +0000 |
commit | 41108b9ed9f32ca9ad1b3d4a48a91a6f22c65db6 (patch) | |
tree | 6b70b2446002e04e04bcbb0eefa74003b9709524 /nsswitch | |
parent | f3c5980f76f30c65378623e4f5b25e73d4ace25b (diff) | |
download | samba-41108b9ed9f32ca9ad1b3d4a48a91a6f22c65db6.tar.gz |
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>
Diffstat (limited to 'nsswitch')
-rw-r--r-- | nsswitch/wb_common.c | 10 | ||||
-rw-r--r-- | nsswitch/winbind_client.h | 1 | ||||
-rw-r--r-- | nsswitch/winbind_struct_protocol.h | 10 |
3 files changed, 10 insertions, 11 deletions
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c index 45c1969acc2..1a3ed1241c5 100644 --- a/nsswitch/wb_common.c +++ b/nsswitch/wb_common.c @@ -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) { diff --git a/nsswitch/winbind_client.h b/nsswitch/winbind_client.h index c0ee6c9391a..93b5672ba04 100644 --- a/nsswitch/winbind_client.h +++ b/nsswitch/winbind_client.h @@ -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, diff --git a/nsswitch/winbind_struct_protocol.h b/nsswitch/winbind_struct_protocol.h index 4a5255c7fe4..87d10ae6e3e 100644 --- a/nsswitch/winbind_struct_protocol.h +++ b/nsswitch/winbind_struct_protocol.h @@ -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 |