mirror of
https://github.com/glfw/glfw.git
synced 2026-02-17 21:12:34 +01:00
Replace stray malloc with calloc
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user