Reported-by: Niels Thykier <niels@thykier.net>
@@ -102,6 +102,7 @@ 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
@@ -216,8 +216,10 @@ file_copy(const char *src, const char *dst)
return -1;
dstfd = creat(dst, 0600);
- if (dstfd < 0)
+ if (dstfd < 0) {
+ close(srcfd);
+ }
/* FIXME: leaves a dangling destination file on error. */