Delete temporary string within demangler even in failure cases.
[deliverable/binutils-gdb.git] / libiberty / pex-msdos.c
index ab4d736429e801bbb956fc06b315039a0a084121..fa0f40ac9edaad32e9834abf6d1cb94010a152b6 100644 (file)
@@ -59,7 +59,7 @@ static pid_t pex_msdos_exec_child (struct pex_obj *, int, const char *,
                                  int, int, int, int,
                                  int, const char **, int *);
 static int pex_msdos_close (struct pex_obj *, int);
-static int pex_msdos_wait (struct pex_obj *, pid_t, int *, struct pex_time *,
+static pid_t pex_msdos_wait (struct pex_obj *, pid_t, int *, struct pex_time *,
                           int, const char **, int *);
 static void pex_msdos_cleanup (struct pex_obj *);
 
@@ -282,7 +282,7 @@ pex_msdos_exec_child (struct pex_obj *obj, int flags, const char *executable,
    has already completed, and we just need to return the exit
    status.  */
 
-static int
+static pid_t
 pex_msdos_wait (struct pex_obj *obj, pid_t pid, int *status,
                struct pex_time *time, int done ATTRIBUTE_UNUSED,
                const char **errmsg ATTRIBUTE_UNUSED,
@@ -310,10 +310,8 @@ pex_msdos_cleanup (struct pex_obj  *obj)
 
   ms = (struct pex_msdos *) obj->sysdep;
   for (i = 0; i < PEX_MSDOS_FILE_COUNT; ++i)
-    if (msdos->files[i] != NULL)
-      free (msdos->files[i]);
-  if (msdos->statuses != NULL)
-    free (msdos->statuses);
+    free (msdos->files[i]);
+  free (msdos->statuses);
   free (msdos);
   obj->sysdep = NULL;
 }
This page took 0.02534 seconds and 4 git commands to generate.