diff options
Diffstat (limited to 'extension/filefuncs.c')
-rw-r--r-- | extension/filefuncs.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) { |