summaryrefslogtreecommitdiffstats
path: root/libiberty/pex-win32.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2011-04-20 19:06:46 +0000
committerDJ Delorie <dj@redhat.com>2011-04-20 19:06:46 +0000
commit4ff224cb8d9347245ffea0f5853d862f0574452e (patch)
treef0ad924656bb6f1332030f73e18939949db327f0 /libiberty/pex-win32.c
parente7782cf63b834cc4c4d159dcb6e3a9908b12432f (diff)
downloadppe42-binutils-4ff224cb8d9347245ffea0f5853d862f0574452e.tar.gz
ppe42-binutils-4ff224cb8d9347245ffea0f5853d862f0574452e.zip
merge from gcc
Diffstat (limited to 'libiberty/pex-win32.c')
-rw-r--r--libiberty/pex-win32.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c
index 4427406748..107ac6fdcc 100644
--- a/libiberty/pex-win32.c
+++ b/libiberty/pex-win32.c
@@ -210,10 +210,8 @@ mingw_rootify (const char *executable)
if (!namebuf || !foundbuf)
{
RegCloseKey (hKey);
- if (namebuf)
- free (namebuf);
- if (foundbuf)
- free (foundbuf);
+ free (namebuf);
+ free (foundbuf);
return executable;
}
@@ -315,8 +313,7 @@ msys_rootify (const char *executable)
return tack_on_executable (buf, executable);
/* failed */
- if (buf)
- free (buf);
+ free (buf);
return executable;
}
#endif
@@ -607,8 +604,7 @@ win32_spawn (const char *executable,
si,
pi))
{
- if (env_block)
- free (env_block);
+ free (env_block);
free (full_executable);
@@ -618,18 +614,14 @@ win32_spawn (const char *executable,
/* Clean up. */
CloseHandle (pi->hThread);
free (full_executable);
- if (env_block)
- free (env_block);
+ free (env_block);
return (pid_t) pi->hProcess;
error:
- if (env_block)
- free (env_block);
- if (cmdline)
- free (cmdline);
- if (full_executable)
- free (full_executable);
+ free (env_block);
+ free (cmdline);
+ free (full_executable);
return (pid_t) -1;
}
OpenPOWER on IntegriCloud