Is this a real memory leak?

Ferenc Wágner wferi at niif.hu
Thu Jun 29 09:48:18 UTC 2023


Jeremy Allison <jra at samba.org> writes:

> On Tue, Jun 27, 2023 at 12:41:15PM +0200, Ferenc Wágner via samba-technical wrote:
>
>> Please take a look at the following patch, taken from
>> https://github.com/balabit-deps/balabit-os-8-samba/commit/5f46ae6282db1457b8ef8bbfb4e97eb4aadd55b4:
>>
>> From 5f46ae6282db1457b8ef8bbfb4e97eb4aadd55b4 Mon Sep 17 00:00:00 2001
>> From: Balazs Scheidler <bazsi at balabit.hu>
>> Date: Wed, 22 Aug 2012 11:34:43 +0200
>> Subject: [PATCH] nsswitch/libwbclient: fixed a memory leak in wbcAuthenticateUserEx
>>
>> (cherry picked from commit zorp-os-5.0 / f0e88410bd2528517910f780d71e63f8effb91ef)
>> ---
>> nsswitch/libwbclient/wbc_pam.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/nsswitch/libwbclient/wbc_pam.c b/nsswitch/libwbclient/wbc_pam.c
>> index e4cd2963..b16c9424 100644
>> --- a/nsswitch/libwbclient/wbc_pam.c
>> +++ b/nsswitch/libwbclient/wbc_pam.c
>> @@ -415,6 +415,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,
>>
>> Do you agree that this patches an actual memory leak?  If so, would you
>> please consider taking it?
>
> Thanks Ferenc, this does look like a real memory leak to me.

Thanks for taking the time, Jeremy!  What could I do to get this
included in Samba, what's the preferred process for submitting patches?
-- 
Regards,
Feri.



More information about the samba-technical mailing list