vidcontrol: use calloc where appropriate
Reported by: kib
This commit is contained in:
parent
a304ad90e9
commit
becf2d11e8
@ -393,8 +393,8 @@ load_vt4mappingtable(unsigned int nmappings, FILE *f)
|
||||
if (nmappings == 0)
|
||||
return (NULL);
|
||||
|
||||
if ((t = malloc(sizeof *t * nmappings)) == NULL) {
|
||||
warn("malloc");
|
||||
if ((t = calloc(nmappings, sizeof(*t))) == NULL) {
|
||||
warn("calloc");
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user