]> granicus.if.org Git - sysstat/commit
sar/sadf: Don't reallocate buffers for activities not present in file
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 6 Feb 2022 16:51:30 +0000 (17:51 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 6 Feb 2022 16:51:30 +0000 (17:51 +0100)
commit3ab10c88f6835b90145174f6c0a467f317bdb160
tree88d6db94276b3ec5f6c84aa5eea5552ee1b7052a
parent5c1505821918565c9d13958fce387df1d135e74b
sar/sadf: Don't reallocate buffers for activities not present in file

Buffer reallocation would fail for activities which are not in the file
being read. This is because @nr2 = -1 and @nr2 is used to compute the
memory to allocate in reallocate_all_buffers():

SREALLOC(a->buf[j], void,
 (size_t) a->msize * nr_realloc * (size_t) a->nr2);

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sa_common.c