projects
/
users
/
hanada
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16ca75b
)
Add some minor missing error checks
author
Alvaro Herrera
<
[email protected]
>
Thu, 16 Dec 2010 15:22:08 +0000
(12:22 -0300)
committer
Alvaro Herrera
<
[email protected]
>
Thu, 16 Dec 2010 15:23:07 +0000
(12:23 -0300)
src/port/win32env.c
patch
|
blob
|
blame
|
history
diff --git
a/src/port/win32env.c
b/src/port/win32env.c
index 8e9b948c5283c828c4ded468a14503a410c72236..42f032680527ef09f154794f3bde09fd88f474d4 100644
(file)
--- 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))