Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37702133
en ru br
ALT Linux repos
S:3.10.0.207.774b-alt1
5.0: 2.8.7-alt3
4.1: 2.8.7-alt3
4.0: 2.8.7-alt3
3.0: 2.8.7-alt2

Other repositories
Upstream:2.8.1

Group :: File tools
RPM: diffutils

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: diffutils-2.8.7-alt-tmp.patch
Download


--- diffutils-2.8.7/src/sdiff.c.orig	2004-04-12 07:44:35 +0000
+++ diffutils-2.8.7/src/sdiff.c	2005-05-17 12:58:44 +0000
@@ -990,13 +990,13 @@ edit (struct line_filter *left, char con
 	    int fd;
 
 	    if (tmpname)
-	      tmp = fopen (tmpname, "w");
-	    else
 	      {
-		if ((fd = temporary_file ()) < 0)
-		  perror_fatal ("mkstemp");
-		tmp = fdopen (fd, "w");
+		unlink (tmpname);
+		free (tmpname);
 	      }
+	    if ((fd = temporary_file ()) < 0)
+	      perror_fatal ("mkstemp");
+	    tmp = fdopen (fd, "w");
 
 	    if (! tmp)
 	      perror_fatal (tmpname);
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin