mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-04 15:17:35 +00:00
counters: Ensure name_wid[0] is initialized to zero
I was seeing some segfaults and other weirdness without this. Signed-off-by: Andy Grover <agrover@versity.com>
This commit is contained in:
@@ -120,6 +120,7 @@ static int counters_cmd(int argc, char **argv)
|
||||
goto out;
|
||||
}
|
||||
memset(&ctrs[nr], 0, (alloced - nr) * sizeof(*ctrs));
|
||||
memset(&name_wid[nr], 0, (alloced - nr) * sizeof(*name_wid));
|
||||
}
|
||||
|
||||
ctr = &ctrs[nr];
|
||||
|
||||
Reference in New Issue
Block a user