summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2010-08-19 00:53:39 +0100
committerPádraig Brady <P@draigBrady.com>2010-08-23 07:15:24 +0100
commit2ed90c4c9dca45ca266f4d5d25b6bac982765004 (patch)
tree7b823e5d552ee1c98cac371661d26edb216b6f61 /src
parent6d78c2df58a4b22ad4a8bfae1b7780f02276ba3d (diff)
downloadcoreutils-2ed90c4c9dca45ca266f4d5d25b6bac982765004.tar.xz
stat: fix a small memory leak with %N
* src/stat.c (print_stat): Free the buffer returned from areadlink_with_size().
Diffstat (limited to 'src')
-rw-r--r--src/stat.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/stat.c b/src/stat.c
index c3730f0b1..18a746f97 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -632,6 +632,7 @@ print_stat (char *pformat, size_t prefix_len, char m,
}
printf (" -> ");
out_string (pformat, prefix_len, quote (linkname));
+ free (linkname);
}
break;
case 'd':