Skip to content
Snippets Groups Projects
Commit 5d2aff9d authored by Rolf Eike Beer's avatar Rolf Eike Beer
Browse files

ProcessWin32: use strdup() instead of open coding it

parent cf8beae3
No related branches found
No related tags found
No related merge requests found
......@@ -713,11 +713,10 @@ int kwsysProcess_SetPipeFile(kwsysProcess* cp, int pipe, const char* file)
*pfile = 0;
}
if (file) {
*pfile = (char*)malloc(strlen(file) + 1);
*pfile = strdup(file);
if (!*pfile) {
return 0;
}
strcpy(*pfile, file);
}
/* If we are redirecting the pipe, do not share it or use a native
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment