From: "Måns Rullgård" <mans@mansr.com>
To: SoX-devel <sox-devel@lists.sourceforge.net>
Subject: Re: [Patch] Fix win32-glob.c resource leak hfindfile
Date: Tue, 09 Jul 2019 10:44:12 +0100 [thread overview]
Message-ID: <yw1x36jfh79v.fsf@mansr.com> (raw)
In-Reply-To: <2025529462.6370985.1562591692400@mail.yahoo.com> (Wolfgang Stoeggl via SoX-devel's message of "Mon, 8 Jul 2019 13:14:52 +0000 (UTC)")
Wolfgang Stoeggl via SoX-devel <sox-devel@lists.sourceforge.net> writes:
> 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]
Thanks, added to master.
--
Måns Rullgård
_______________________________________________
SoX-devel mailing list
SoX-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-devel
prev parent reply other threads:[~2019-07-09 10:00 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 ` [Patch] Fix win32-glob.c resource leak hfindfile Wolfgang Stoeggl via SoX-devel
2019-07-09 9:44 ` Måns Rullgård [this message]
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=yw1x36jfh79v.fsf@mansr.com \
--to=sox-devel@lists.sourceforge.net \
/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).