programs/cmd: Do the assignment after the return to avoid a missing free() (Coverity).

This commit is contained in:
Paul Vriens 2007-07-12 09:35:00 +02:00 committed by Alexandre Julliard
parent 11ccc0f79e
commit 61d8402fe2
1 changed files with 2 additions and 2 deletions

View File

@ -1647,11 +1647,11 @@ static WCHAR *WCMD_expand_envvar(WCHAR *start) {
*(colonpos+1) = savedchar;
}
s = WCMD_strdupW(endOfVar + 1);
/* Command line - just ignore this */
if (context == NULL) return endOfVar+1;
s = WCMD_strdupW(endOfVar + 1);
/* Batch - replace unknown env var with nothing */
if (colonpos == NULL) {
strcpyW (start, s);