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;
|
*(colonpos+1) = savedchar;
|
||||||
}
|
}
|
||||||
|
|
||||||
s = WCMD_strdupW(endOfVar + 1);
|
|
||||||
|
|
||||||
/* Command line - just ignore this */
|
/* Command line - just ignore this */
|
||||||
if (context == NULL) return endOfVar+1;
|
if (context == NULL) return endOfVar+1;
|
||||||
|
|
||||||
|
s = WCMD_strdupW(endOfVar + 1);
|
||||||
|
|
||||||
/* Batch - replace unknown env var with nothing */
|
/* Batch - replace unknown env var with nothing */
|
||||||
if (colonpos == NULL) {
|
if (colonpos == NULL) {
|
||||||
strcpyW (start, s);
|
strcpyW (start, s);
|
||||||
|
|
Loading…
Reference in New Issue