mirror of
https://github.com/postgres/postgres.git
synced 2026-06-08 16:26:30 -04:00
Add some minor missing error checks
This commit is contained in:
parent
16ca75baeb
commit
e359b8496d
1 changed files with 5 additions and 0 deletions
|
|
@ -115,9 +115,14 @@ pgwin32_putenv(const char *envval)
|
|||
* Need a copy of the string so we can modify it.
|
||||
*/
|
||||
envcpy = strdup(envval);
|
||||
if (!envcpy)
|
||||
return -1;
|
||||
cp = strchr(envcpy, '=');
|
||||
if (cp == NULL)
|
||||
{
|
||||
free(envcpy);
|
||||
return -1;
|
||||
}
|
||||
*cp = '\0';
|
||||
cp++;
|
||||
if (strlen(cp))
|
||||
|
|
|
|||
Loading…
Reference in a new issue