In a specific code path of the SNEBuildHash function, when the
environment variable is of the format VMWARE_*=[0|1], the value
is not freed. Fixed the memory leak.
/*********************************************************
- * Copyright (C) 1998-2018 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2019 VMware, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
char *realValue = (value[0] == '0')
? NULL
: Util_SafeStrdup(&value[1]);
+ free(value);
+ value = NULL;
HashTable_ReplaceOrInsert(environTable, realKey, realValue);
} else {
HashTable_LookupOrInsert(environTable, key, value);