Fix for memset bug found by buildfarm.
[rsync/rsync.git] / flist.c
diff --git a/flist.c b/flist.c
index a14320d..60a0e8d 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -1330,7 +1330,7 @@ void free_file(struct file_struct *file, int free_the_struct)
        if (free_the_struct)
                free(file);
        else
-               memset(file, 0, sizeof file[0]);
+               memset(file, 0, min_file_struct_len);
 }