bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI, mktemp: plug an inconsequential leak


From: Jim Meyering
Subject: FYI, mktemp: plug an inconsequential leak
Date: Sun, 28 Sep 2008 23:04:31 +0200

Here are two tiny patches:

>From 0643c51cabdb4d161ef4da9bc27e4e0e307ec6a7 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 27 Sep 2008 12:05:48 +0200
Subject: [PATCH] mktemp: plug an inconsequential leak

* src/mktemp.c (main) [lint]: Free template.
---
 src/mktemp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mktemp.c b/src/mktemp.c
index d745e60..0555d41 100644
--- a/src/mktemp.c
+++ b/src/mktemp.c
@@ -14,7 +14,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

-/* Jim Meyering */
+/* Written by Jim Meyering.  */

 #include <config.h>
 #include <stdio.h>
@@ -279,6 +279,7 @@ main (int argc, char **argv)

 #ifdef lint
   free (dest_name);
+  free (template);
 #endif

   exit (status);
--
1.6.0.2.307.gc427


>From cee53c14303b5c0a9c587242c775731e0a9c748e Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 27 Sep 2008 12:08:38 +0200
Subject: [PATCH] build: avoid spurious valgrind warning about uses of touch

* .vg-suppressions (utimensat-NULL): Avoid bogus valgrind warning
that appears on at least Fedora 9.
---
 .vg-suppressions |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/.vg-suppressions b/.vg-suppressions
index 4b90cf4..5d0ed20 100644
--- a/.vg-suppressions
+++ b/.vg-suppressions
@@ -1,6 +1,6 @@
 # Suppress valgrind diagnostics we don't care about.

-# Copyright (C) 2003, 2004, 2006-2007 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006-2008 Free Software Foundation, Inc.

 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -90,3 +90,11 @@
    fun:gobble_file
    fun:main
 }
+{
+   utimensat-NULL
+   Memcheck:Param
+   utimensat(filename)
+   fun:futimens
+   fun:gl_futimens
+   fun:main
+}
--
1.6.0.2.307.gc427




reply via email to

[Prev in Thread] Current Thread [Next in Thread]