Просмотр исходного кода

Revert "dpkg-divert: fix minor file descriptor leak found by cppcheck"

This reverts commit bdcee319a90eee494af70e6725fed8b4e8f16584.
Guillem Jover лет назад: 15
Родитель
Сommit
0489d13cb0
2 измененных файлов с 1 добавлено и 4 удалено
  1. 0 1
      debian/changelog
  2. 1 3
      src/divertcmd.c

+ 0 - 1
debian/changelog

@@ -103,7 +103,6 @@ dpkg (1.16.0) UNRELEASED; urgency=low
     Closes: #605719
   * Fix dpkg-source's regression with empty patches (introduced while fixing
     #613023). Closes: #619541
-  * Fix minor file descriptor leak found by cppcheck. Closes: #620380
 
   [ Jonathan Nieder ]
   * Remove support for use of synchronous sync(2), due to its pernicious

+ 1 - 3
src/divertcmd.c

@@ -216,10 +216,8 @@ file_copy(const char *src, const char *dst)
 		return -1;
 
 	dstfd = creat(dst, 0600);
-	if (dstfd < 0) {
-		close(srcfd);
+	if (dstfd < 0)
 		return -1;
-	}
 
 	/* FIXME: leaves a dangling destination file on error. */