cpio/cpio-2.11-fix-memory-leak-in-copyin.patch
Pavel Raiskup 5e41a43906 cpio: fix for small memory leak in copyin.c
Resolves: #919454
Version: 2.11-17
2013-03-11 13:39:46 +01:00

21 lines
458 B
Diff

--- cpio-2.11.old/src/copyin.c 2013-03-08 14:25:16.153845747 +0000
+++ cpio-2.11.fixleak/src/copyin.c 2013-03-08 14:24:53.148926140 +0000
@@ -1486,7 +1486,7 @@
apply_delayed_set_stat ();
if (append_flag)
- return;
+ goto out;
if (archive_format == arf_newascii || archive_format == arf_crcascii)
{
@@ -1501,5 +1501,8 @@
(unsigned long) blocks),
(unsigned long) blocks);
}
+
+ out:
+ free (file_hdr.c_name);
}