diff --git a/src/cmd/INIT/mamake.c b/src/cmd/INIT/mamake.c index f88f49941fc8..a23f5e8d3ada 100644 --- a/src/cmd/INIT/mamake.c +++ b/src/cmd/INIT/mamake.c @@ -1029,8 +1029,8 @@ static void substitute(Buf_t *buf, char *s) while (*q && !isspace(*q)) q++; n++; - c = *q, *q = 0; /* terminate for strdup */ - if (!(argv = realloc(argv, (n+1)*sizeof(char*))) || !(argv[n-1] = strdup(a))) + c = *q, *q = 0; /* terminate for duplicate() */ + if (!(argv = realloc(argv, (n+1)*sizeof(char*))) || !(argv[n-1] = duplicate(a))) out_of_memory(); *q = c; }