When failing to read the output of `readlink -f`, free the memory buffer
used for it.
---
src/ext2fs-c.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/ext2fs-c.c b/src/ext2fs-c.c
index 9e0770a..f3ca7dc 100644
--- a/src/ext2fs-c.c
+++ b/src/ext2fs-c.c
@@ -631,6 +631,7 @@ ext2_copy_file (struct ext2_data *data, const char *src, const char
*dest)
}
if (fgets (new_dirname, PATH_MAX, fp) == NULL) {
pclose (fp);
+ free (new_dirname);
goto cont;
}
pclose (fp);
--
1.9.3