mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 20:04:06 +00:00
programs/cmd: Do the assignment after the return to avoid a missing free() (Coverity).
This commit is contained in:
parent
11ccc0f79e
commit
61d8402fe2
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue