The Samba-Bugzilla – Attachment 4202 Details for
Bug 6390
[PATCH] File descriptor leak in source3/torture/vfstest.c
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proper fix for resource leak in source3/torture/vfstest.c
0001-source3-torture-vfstest.c-process_file-fixed-file-de.patch (text/plain), 858 bytes, created by
Slava Semushin
on 2009-05-25 12:00:29 UTC
(
hide
)
Description:
Proper fix for resource leak in source3/torture/vfstest.c
Filename:
MIME Type:
Creator:
Slava Semushin
Created:
2009-05-25 12:00:29 UTC
Size:
858 bytes
patch
obsolete
>From b12a69df29dad939a94a1060d8b107b7f27c1162 Mon Sep 17 00:00:00 2001 >From: Slava Semushin <php-coder@altlinux.ru> >Date: Mon, 25 May 2009 23:59:05 +0700 >Subject: [PATCH] source3/torture/vfstest.c(process_file): fixed file descriptor leak. > >Found by cppcheck: >[./source3/torture/vfstest.c:400]: (error) Resource leak: file >--- > source3/torture/vfstest.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > >diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c >index bb4dc35..2ba7c57 100644 >--- a/source3/torture/vfstest.c >+++ b/source3/torture/vfstest.c >@@ -397,6 +397,10 @@ static void process_file(struct vfs_state *pvfs, char *filename) { > while (fgets(command, 3 * PATH_MAX, file) != NULL) { > process_cmd(pvfs, command); > } >+ >+ if (file != stdin) { >+ fclose(file); >+ } > } > > void exit_server(const char *reason) >-- >1.6.3.1 >
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 6390
:
4184
| 4202