summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2022-11-04 11:23:52 +0100
committerJeremy Allison <jra@samba.org>2022-11-22 18:27:33 +0000
commit9735498f60f83fd231ce20845db9288f4d343fe6 (patch)
tree04f316f1731af75da58122ef64f3272bf9aba640 /nsswitch
parent59b5abbe8cec52d7cf1197a91f32d832670284d5 (diff)
downloadsamba-9735498f60f83fd231ce20845db9288f4d343fe6.tar.gz
pam_winbind: Fix a memleak
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/pam_winbind.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 06a8db21b69..87aa79de82c 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -2461,6 +2461,7 @@ static char winbind_get_separator(struct pwb_context *ctx)
{
wbcErr wbc_status;
static struct wbcInterfaceDetails *details = NULL;
+ char result;
wbc_status = wbcCtxInterfaceDetails(ctx->wbc_ctx, &details);
if (!WBC_ERROR_IS_OK(wbc_status)) {
@@ -2474,7 +2475,9 @@ static char winbind_get_separator(struct pwb_context *ctx)
return '\0';
}
- return details->winbind_separator;
+ result = details->winbind_separator;
+ wbcFreeMemory(details);
+ return result;
}