Reported by Arno Onken in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00069.html>.
* lib/rpmatch.c (try): Fix memory leak.
* lib/copy-file.c: Include "ignore-value.h".
(qcopy_file_preserving): Ignore chown value.
* modules/copy-file (Depends-on): Add ignore-value.
+2013-03-19 Paul Eggert <eggert@cs.ucla.edu>
+
+ copy-file, rpmatch: fix problems found by cppcheck
+ Reported by Arno Onken in
+ <http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00069.html>.
+ * lib/rpmatch.c (try): Fix memory leak.
+ * lib/copy-file.c: Include "ignore-value.h".
+ (qcopy_file_preserving): Ignore chown value.
+ * modules/copy-file (Depends-on): Add ignore-value.
+
2013-01-27 Jim Meyering <jim@meyering.net>
prefix-gnulib-mk: give better diagnostics
#endif
#include "error.h"
+#include "ignore-value.h"
#include "safe-read.h"
#include "full-write.h"
#include "acl.h"
#if HAVE_CHOWN
/* Preserve the owner and group. */
- chown (dest_filename, statbuf.st_uid, statbuf.st_gid);
+ ignore_value (chown (dest_filename, statbuf.st_uid, statbuf.st_gid));
#endif
/* Preserve the access permissions. */
return -1;
/* Compile the pattern and cache it for future runs. */
if (regcomp (re, safe_pattern, REG_EXTENDED) != 0)
- return -1;
+ {
+ free (safe_pattern);
+ return -1;
+ }
*lastp = safe_pattern;
}
fstat
full-write
gettext-h
+ignore-value
open
quote
safe-read