Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite359b84

Browse files
committed
Add some minor missing error checks
1 parent16ca75b commite359b84

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/port/win32env.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,14 @@ pgwin32_putenv(const char *envval)
115115
* Need a copy of the string so we can modify it.
116116
*/
117117
envcpy=strdup(envval);
118+
if (!envcpy)
119+
return-1;
118120
cp=strchr(envcpy,'=');
119121
if (cp==NULL)
122+
{
123+
free(envcpy);
120124
return-1;
125+
}
121126
*cp='\0';
122127
cp++;
123128
if (strlen(cp))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp