Replace stray malloc with calloc
This commit is contained in:
parent
65f3bb01be
commit
1343ef5915
@ -187,7 +187,7 @@ createAnonymousFile(off_t size)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
name = malloc(strlen(path) + sizeof(template));
|
name = calloc(strlen(path) + sizeof(template), 1);
|
||||||
strcpy(name, path);
|
strcpy(name, path);
|
||||||
strcat(name, template);
|
strcat(name, template);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user