]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
nsswitch:libwbclient: Fix memory leak
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 19 Jul 2023 00:55:15 +0000 (12:55 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 8 Aug 2023 04:39:37 +0000 (04:39 +0000)
Found by Balazs Scheidler <bazsi@balabit.hu>.

Reported by Ferenc Wágner <wferi@niif.hu> at
https://lists.samba.org/archive/samba-technical/2023-June/138271.html

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
nsswitch/libwbclient/wbc_pam.c

index aed9c05fa712da041f4ce90cf6db31b7e39003fb..786d578478ee072260d268bf95c3892dd1203cba 100644 (file)
@@ -418,6 +418,7 @@ wbcErr wbcCtxAuthenticateUserEx(struct wbcContext *ctx,
                                 params->domain_name,
                                 sep_response.data.info.winbind_separator,
                                 params->account_name);
+                       winbindd_free_response(&sep_response);
                } else {
                        strncpy(request.data.auth.user,
                                params->account_name,