The Samba-Bugzilla – Attachment 4445 Details for
Bug 6566
[PATCH] source4/lib/registry/patchfile.c: possible file descriptor leak
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposal fix
0001-source4-lib-registry-patchfile.c-reg_diff_load-fixed.patch (text/plain), 946 bytes, created by
Slava Semushin
on 2009-07-18 11:34:59 UTC
(
hide
)
Description:
Proposal fix
Filename:
MIME Type:
Creator:
Slava Semushin
Created:
2009-07-18 11:34:59 UTC
Size:
946 bytes
patch
obsolete
>From c39b79656b48004100395bdf45c7b73fcf8dc4cc Mon Sep 17 00:00:00 2001 >From: Slava Semushin <php-coder@altlinux.ru> >Date: Sat, 18 Jul 2009 23:30:33 +0700 >Subject: [PATCH] source4/lib/registry/patchfile.c(reg_diff_load): fixed possible resource leak. > >File descriptor leaks when write(2) fails and we are returning from >function. > >Found by cppcheck: >[./source4/lib/registry/patchfile.c:319]: (error) Resource leak: fd >--- > source4/lib/registry/patchfile.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > >diff --git a/source4/lib/registry/patchfile.c b/source4/lib/registry/patchfile.c >index 9258069..24d86ab 100644 >--- a/source4/lib/registry/patchfile.c >+++ b/source4/lib/registry/patchfile.c >@@ -316,6 +316,7 @@ _PUBLIC_ WERROR reg_diff_load(const char *filename, > if (read(fd, &hdr, 4) != 4) { > DEBUG(0, ("Error reading registry patch file `%s'\n", > filename)); >+ close(fd); > return WERR_GENERAL_FAILURE; > } > >-- >1.6.3.3 >
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 6566
: 4445