Skip to content

Commit 8d5b332

Browse files
peffgitster
authored andcommitted
compat/mingw: brown paper bag fix for 50a6c8e
Commit 50a6c8e (use st_add and st_mult for allocation size computation, 2016-02-22) fixed up many xmalloc call-sites including ones in compat/mingw.c. But I screwed up one of them, which was half-converted to ALLOC_ARRAY, using a very early prototype of the function. And I never caught it because I don't build on Windows. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 08c95df commit 8d5b332

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/mingw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ static pid_t mingw_spawnve_fd(const char *cmd, const char **argv, char **deltaen
10281028
free(quoted);
10291029
}
10301030

1031-
wargs = xmalloc_array(st_add(st_mult(2, args.len), 1), sizeof(wchar_t));
1031+
ALLOC_ARRAY(wargs, st_add(st_mult(2, args.len), 1));
10321032
xutftowcs(wargs, args.buf, 2 * args.len + 1);
10331033
strbuf_release(&args);
10341034

0 commit comments

Comments
 (0)