The Samba-Bugzilla – Attachment 12543 Details for
Bug 12289
smbd: memory leak when listing user quotas if not records exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.5.next
fix-12289.patch (text/plain), 1.02 KB, created by
Uri Simchoni
on 2016-10-04 19:39:53 UTC
(
hide
)
Description:
git-am fix for 4.5.next
Filename:
MIME Type:
Creator:
Uri Simchoni
Created:
2016-10-04 19:39:53 UTC
Size:
1.02 KB
patch
obsolete
>From 30c2e4576eb3859aff36bf8e7be957337152c366 Mon Sep 17 00:00:00 2001 >From: Uri Simchoni <uri@samba.org> >Date: Sun, 18 Sep 2016 11:05:23 +0300 >Subject: [PATCH] smbd: free talloc context if no quota records are available > >When generating a list of user quota records, free the memory >context that controls this list if the list is empty. Otherwise, >the context remains unreferenced and memory is leaked. > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=12289 > >Signed-off-by: Uri Simchoni <uri@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit 175bc6f1e3442f5cb2258aaadf318ebf23c5d769) >--- > source3/smbd/ntquotas.c | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/source3/smbd/ntquotas.c b/source3/smbd/ntquotas.c >index 93f4a2a..4acfa50 100644 >--- a/source3/smbd/ntquotas.c >+++ b/source3/smbd/ntquotas.c >@@ -226,6 +226,9 @@ int vfs_get_user_ntquota_list(files_struct *fsp, SMB_NTQUOTA_LIST **qt_list) > } > endpwent(); > >+ if (*qt_list == NULL) { >+ TALLOC_FREE(mem_ctx); >+ } > return 0; > } > >-- >2.5.5 >
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
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 12289
: 12543