From d61172dcf8117f4d3092a186122e3c66c17c58ba Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 21 Oct 2012 21:42:19 +0200 Subject: Bug fix in do_stat(). --- extension/filefuncs.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'extension/filefuncs.c') diff --git a/extension/filefuncs.c b/extension/filefuncs.c index bc2f2afc..f2479c50 100644 --- a/extension/filefuncs.c +++ b/extension/filefuncs.c @@ -359,6 +359,9 @@ do_stat(int nargs, awk_value_t *result) name = file_param.str_value.str; array = array_param.array_cookie; + /* always empty out the array */ + clear_array(array); + /* lstat the file, if error, set ERRNO and return */ ret = lstat(name, & sbuf); if (ret < 0) { -- cgit v1.2.3