From: Wolfgang Stoeggl via SoX-devel <sox-devel@lists.sourceforge.net>
To: "sox-devel@lists.sourceforge.net" <sox-devel@lists.sourceforge.net>
Cc: Wolfgang Stoeggl <c72578@yahoo.de>
Subject: [Patch] Fix win32-glob.c resource leak hfindfile
Date: Mon, 8 Jul 2019 13:14:52 +0000 (UTC) [thread overview]
Message-ID: <2025529462.6370985.1562591692400@mail.yahoo.com> (raw)
In-Reply-To: 2025529462.6370985.1562591692400.ref@mail.yahoo.com
[-- Attachment #1.1: Type: text/plain, Size: 699 bytes --]
Hello,
please find attached a patch for src/win32-glob.c
I have just realized, that the merge requests are not in use [1], so I am posting the patch file here.
Fix win32-glob.c resource leak hfindfile
Open the HANDLE hfindfile later, after the checks of pattern, flags,
unused, pglob and length of file name. This avoids a possible return
from function glob() without FindClose(hfindfile).
- Fixes the following Cppcheck errors:
[src/win32-glob.c:80]
(error) Resource leak: hfindfile [resourceLeak]
[src/win32-glob.c:88]
(error) Resource leak: hfindfile [resourceLeak]
Best regards
Wolfgang
[1] https://sourceforge.net/p/sox/code/merge-requests/7/
[-- Attachment #1.2: Type: text/html, Size: 996 bytes --]
[-- Attachment #2: 0001-Fix-win32-glob.c-resource-leak-hfindfile.gz --]
[-- Type: application/x-gzip, Size: 750 bytes --]
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
[-- Attachment #4: Type: text/plain, Size: 158 bytes --]
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel
next parent reply other threads:[~2019-07-08 13:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2025529462.6370985.1562591692400.ref@mail.yahoo.com>
2019-07-08 13:14 ` Wolfgang Stoeggl via SoX-devel [this message]
2019-07-09 9:44 ` [Patch] Fix win32-glob.c resource leak hfindfile Måns Rullgård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.sourceforge.net/lists/listinfo/sox-devel
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2025529462.6370985.1562591692400@mail.yahoo.com \
--to=sox-devel@lists.sourceforge.net \
--cc=c72578@yahoo.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/sox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).