aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2014-10-10 22:22:27 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2014-10-10 22:22:27 +0200
commit4bf044cbf2928ad8df5ccfd5e4e86c576f305258 (patch)
treec0cf6a2b4259a9d687312de5e41a74e662dc00f2
parent63fe50279209bcaf5a817f79c9b41f9c72d235a6 (diff)
downloadman-pages-4bf044cbf2928ad8df5ccfd5e4e86c576f305258.tar.gz
readlink.2: Add free() call to example program
Reported-by: Jonny Grant <jg@jguk.org> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/readlink.22
1 files changed, 2 insertions, 0 deletions
diff --git a/man2/readlink.2 b/man2/readlink.2
index b081ad5a21..2e2c536838 100644
--- a/man2/readlink.2
+++ b/man2/readlink.2
@@ -320,6 +320,8 @@ main(int argc, char *argv[])
printf("\(aq%s\(aq points to \(aq%s\(aq\\n", argv[1], linkname);
+ free(linkname);
+
exit(EXIT_SUCCESS);
}
.fi