diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2010-12-16 12:22:08 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2010-12-16 12:23:07 -0300 |
commit | e359b8496d11befb63d4734874d997909c44ad83 (patch) | |
tree | ba1670f04e5e80f3812114ed38381b0be7fa9a4d /src | |
parent | 16ca75baebc56cebc6590691a0b474ee1922519c (diff) | |
download | postgresql-e359b8496d11befb63d4734874d997909c44ad83.tar.gz postgresql-e359b8496d11befb63d4734874d997909c44ad83.zip |
Add some minor missing error checks
Diffstat (limited to 'src')
-rw-r--r-- | src/port/win32env.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/port/win32env.c b/src/port/win32env.c index 8e9b948c528..42f03268052 100644 --- a/src/port/win32env.c +++ b/src/port/win32env.c @@ -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)) |