1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-08 07:07:25 -04:00

Replace stray malloc with calloc

This commit is contained in:
Camilla Berglund 2015-08-09 23:21:11 +02:00
parent 65f3bb01be
commit 1343ef5915

View File

@ -187,7 +187,7 @@ createAnonymousFile(off_t size)
return -1;
}
name = malloc(strlen(path) + sizeof(template));
name = calloc(strlen(path) + sizeof(template), 1);
strcpy(name, path);
strcat(name, template);