[Pkg-wmaker-commits] [wmget] 29/41: debian/patches/fix_resource_leaks.patch: Call fclose() on all the files we fopen().

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sun Aug 23 17:06:01 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmget.

commit 336ff73237b38de37559b4d6b3069ff87a8f23eb
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Fri Jan 30 08:35:43 2015 -0600

    debian/patches/fix_resource_leaks.patch: Call fclose() on all the files we
    fopen().
---
 debian/patches/fix_resource_leaks.patch | 25 +++++++++++++++++++++++++
 debian/patches/series                   |  1 +
 2 files changed, 26 insertions(+)

diff --git a/debian/patches/fix_resource_leaks.patch b/debian/patches/fix_resource_leaks.patch
new file mode 100644
index 0000000..874f388
--- /dev/null
+++ b/debian/patches/fix_resource_leaks.patch
@@ -0,0 +1,25 @@
+Description: Fix resource leaks.
+ In particular, fclose() all the files we fopen().
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Last-Update: 2015-01-30
+
+--- a/configure.c
++++ b/configure.c
+@@ -373,6 +373,7 @@
+ 
+     if ((rcfp = fopen (rcfile, "rt"))) {
+         read_rcfile (rcfp, cfg);
++        fclose (rcfp);
+     } else {
+         /* rcfiles are fully optional... */
+         debug_sys ("Could not open rcfile '%s'", rcfile);
+--- a/retrieve.c
++++ b/retrieve.c
+@@ -98,6 +98,7 @@
+     fprintf (error_file, " To file: %s\n", job->options.save_to);
+     fprintf (error_file, " Error: %s\n", msg);
+     fprintf (error_file, " (" WMGET_VERSION_BANNER ")\n");
++    fclose (error_file);
+ }
+ 
+ 
diff --git a/debian/patches/series b/debian/patches/series
index c70c1f7..9cadf08 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 01_Makefile.patch
 fix_-Wpointer-to-int-cast.patch
+fix_resource_leaks.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmget.git



More information about the Pkg-wmaker-commits mailing list