Browse Source

Replace stray malloc with calloc

Camilla Berglund 10 years ago
parent
commit
1343ef5915
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/wl_window.c

+ 1 - 1
src/wl_window.c

@@ -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);