Signed-off-by: Sven Baars sbaars@codeweavers.com --- dlls/ntdll/unix/env.c | 2 +- dlls/ntdll/unix/file.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index fc5c462e04f..3ac1ed9ab63 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -912,7 +912,7 @@ static void rebuild_argv(void) */ static void prepend_argv( const char **args, int count ) { - char **new_argv = malloc( (main_argc + count) * sizeof(*new_argv) ); + char **new_argv; char *p, *end; BOOL write_strings = FALSE; int i, total = 0, new_argc = main_argc + count - 1; diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 2f18325fb90..c033bb06fa3 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -3298,7 +3298,12 @@ static NTSTATUS nt_to_unix_file_name_no_root( const UNICODE_STRING *nameW, char
/* check if prefix exists (except for DOS drives to avoid extra stat calls) */
- if (wcschr( prefix, '/' )) return STATUS_OBJECT_PATH_NOT_FOUND; + if (wcschr( prefix, '/' )) + { + free( unix_name ); + return STATUS_OBJECT_PATH_NOT_FOUND; + } + if (prefix_len != 2 || prefix[1] != ':') { unix_name[pos] = 0;