The Samba-Bugzilla – Attachment 14108 Details for
Bug 13372
vfswrap_getwd() leaks memory.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for master.
0001-Fix-memory-leak-in-vfswrap_getwd.patch (text/plain), 1.24 KB, created by
Jeremy Allison
on 2018-04-06 20:52:48 UTC
(
hide
)
Description:
git-am fix for master.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2018-04-06 20:52:48 UTC
Size:
1.24 KB
patch
obsolete
>From af8c670de35fc8cacf0357b96ef411638a7ac778 Mon Sep 17 00:00:00 2001 >From: Andrew Walker <awalker@ixsystems.com> >Date: Fri, 6 Apr 2018 13:58:39 -0400 >Subject: [PATCH] Fix memory leak in vfswrap_getwd() > >Signed-off-by: Andrew Walker <awalker@ixsystems.com> >--- > source3/modules/vfs_default.c | 16 ++++------------ > 1 file changed, 4 insertions(+), 12 deletions(-) > >diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c >index a26bec457ae..d0614e8b3ff 100644 >--- a/source3/modules/vfs_default.c >+++ b/source3/modules/vfs_default.c >@@ -2215,24 +2215,16 @@ static struct smb_filename *vfswrap_getwd(vfs_handle_struct *handle, > TALLOC_CTX *ctx) > { > char *result; >- struct smb_filename *smb_fname = NULL; >+ struct smb_filename *result_fname = NULL; > > START_PROFILE(syscall_getwd); > result = sys_getwd(); > END_PROFILE(syscall_getwd); >- >- if (result == NULL) { >- return NULL; >- } >- smb_fname = synthetic_smb_fname(ctx, >- result, >- NULL, >- NULL, >- 0); >- if (smb_fname == NULL) { >+ if (result) { >+ result_fname = synthetic_smb_fname(ctx, result, NULL, NULL, 0); > SAFE_FREE(result); > } >- return smb_fname; >+ return result_fname; > } > > /********************************************************************* >-- >2.15.1 (Apple Git-101) >
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 13372
:
14108
|
14109
|
14112
|
14115