summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Lockyer <thisisdaniellockyer@gmail.com>2016-02-16 17:52:07 +0100
committerBernhard Voelker <mail@bernhard-voelker.de>2016-02-16 17:53:24 +0100
commit587a1ba5df564eaea26c0bc5f5f31a934e4424b3 (patch)
tree5639cb8c1bba8dc553c82ab8f109b4fcf51ca07b
parentf91f2bf951de16553ffdf88c116e722809341b5c (diff)
downloadcoreutils-587a1ba5df564eaea26c0bc5f5f31a934e4424b3.tar.xz
date: free timezone variable to avoid valgrind warning
* src/date.c (main): Free TZ variable to pacify valgrind, guarded by IF_LINT.
-rw-r--r--src/date.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/date.c b/src/date.c
index 367055321..269570b1a 100644
--- a/src/date.c
+++ b/src/date.c
@@ -548,6 +548,8 @@ main (int argc, char **argv)
ok &= show_date (format, when, tz);
}
+ IF_LINT (tzfree (tz));
+
return ok ? EXIT_SUCCESS : EXIT_FAILURE;
}