The Samba-Bugzilla – Attachment 3449 Details for
Bug 5656
memory leaks
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fixes mem leaks of wbcAuthenticateUserEx
wbcAuthUserEx_leaks.patch (text/plain), 2.05 KB, created by
SIMON, Gabor
on 2008-07-31 08:07:54 UTC
(
hide
)
Description:
fixes mem leaks of wbcAuthenticateUserEx
Filename:
MIME Type:
Creator:
SIMON, Gabor
Created:
2008-07-31 08:07:54 UTC
Size:
2.05 KB
patch
obsolete
>diff -Naur samba.orig/source/nsswitch/libwbclient/wbc_pam.c samba/source/nsswitch/libwbclient/wbc_pam.c >--- samba.orig/source/nsswitch/libwbclient/wbc_pam.c 2008-05-07 11:58:19.000000000 +0200 >+++ samba/source/nsswitch/libwbclient/wbc_pam.c 2008-07-31 13:13:51.000000000 +0200 >@@ -50,6 +50,41 @@ > return wbc_status; > } > >+wbcErr wbc_free_auth_info(struct wbcAuthUserInfo *i) >+{ >+ uint32_t nsid; >+ >+ if (i) { >+ if (i->account_name) >+ talloc_free(i->account_name); >+ if (i->user_principal) >+ talloc_free(i->user_principal); >+ if (i->full_name) >+ talloc_free(i->full_name); >+ if (i->domain_name) >+ talloc_free(i->domain_name); >+ if (i->dns_domain_name) >+ talloc_free(i->dns_domain_name); >+ >+ if (i->logon_server) >+ talloc_free(i->logon_server); >+ if (i->logon_script) >+ talloc_free(i->logon_script); >+ if (i->profile_path) >+ talloc_free(i->profile_path); >+ if (i->home_directory) >+ talloc_free(i->home_directory); >+ if (i->home_drive) >+ talloc_free(i->home_drive); >+ >+ if (i->sids) >+ talloc_free(i->sids); >+ >+ talloc_free(i); >+ } >+ return WBC_ERR_SUCCESS; >+} >+ > static wbcErr wbc_create_auth_info(TALLOC_CTX *mem_ctx, > const struct winbindd_response *resp, > struct wbcAuthUserInfo **_i) >@@ -302,6 +337,7 @@ > 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, >@@ -416,7 +452,7 @@ > } > > done: >- >+ winbindd_free_response(&response); > return wbc_status; > } > >diff -Naur samba.orig/source/nsswitch/libwbclient/wbclient.h samba/source/nsswitch/libwbclient/wbclient.h >--- samba.orig/source/nsswitch/libwbclient/wbclient.h 2008-05-07 11:58:19.000000000 +0200 >+++ samba/source/nsswitch/libwbclient/wbclient.h 2008-07-31 12:04:56.000000000 +0200 >@@ -246,6 +246,8 @@ > struct wbcSidWithAttr *sids; > }; > >+wbcErr wbc_free_auth_info(struct wbcAuthUserInfo *i); >+ > /* wbcAuthUserInfo->user_flags */ > > #define WBC_AUTH_USER_INFO_GUEST 0x00000001
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 5656
: 3449