gitweb: Make git_get_hash_by_path check type if provided
[gitweb.git] / merge-file.c
index f32c6538250e560039de2d5262def7953915411d..fc9b148993027d4064257d4df8e63a12e1afc5d4 100644 (file)
@@ -21,7 +21,7 @@ static const char *write_temp_file(mmfile_t *f)
        fd = mkstemp(filename);
        if (fd < 0)
                return NULL;
-       filename = strdup(filename);
+       filename = xstrdup(filename);
        if (f->size != xwrite(fd, f->ptr, f->size)) {
                rm_temp_file(filename);
                return NULL;