mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-24 15:15:44 +00:00
Fix NULL-termination of array for later use by String_freeArray.
This commit is contained in:
parent
a93db5234c
commit
70abaadbaf
@ -107,7 +107,7 @@ static void Settings_defaultMeters(Settings* this, int cpuCount) {
|
||||
sizes[1]++;
|
||||
}
|
||||
for (int i = 0; i < 2; i++) {
|
||||
this->columns[i].names = calloc(sizes[i], sizeof(char*));
|
||||
this->columns[i].names = calloc(sizes[i] + 1, sizeof(char*));
|
||||
this->columns[i].modes = calloc(sizes[i], sizeof(int));
|
||||
this->columns[i].len = sizes[i];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user