* src/hostname.c (main): Free allocated memory when compiled with -Dlint. --- src/hostname.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/src/hostname.c b/src/hostname.c
index 7d13575d4e9..8ec9aad4d34 100644
--- a/src/hostname.c
+++ b/src/hostname.c
@@ -104,6 +104,9 @@ main (int argc, char **argv)
if (hostname == NULL)
die (EXIT_FAILURE, errno, _("cannot determine hostname"));
printf ("%s\n", hostname);
+#ifdef lint
+ free(hostname);
+#endif
}
if (optind + 1 < argc)
--
2.26.3
