diff options
author | Volker Lendecke <vl@samba.org> | 2022-11-04 11:23:52 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2022-11-22 18:27:33 +0000 |
commit | 9735498f60f83fd231ce20845db9288f4d343fe6 (patch) | |
tree | 04f316f1731af75da58122ef64f3272bf9aba640 /nsswitch | |
parent | 59b5abbe8cec52d7cf1197a91f32d832670284d5 (diff) | |
download | samba-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.c | 5 |
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; } |