* core.c (core_create_line_syms): Use xstrdup rather than strdup.
authorIan Lance Taylor <ian@airs.com>
Tue, 18 Jun 1996 21:37:38 +0000 (21:37 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 18 Jun 1996 21:37:38 +0000 (21:37 +0000)
* source.c (source_file_lookup_path): Likewise.

gprof/ChangeLog
gprof/core.c
gprof/source.c

index 8551292f67c01fcab2e6e3217db8456f4a449beb..8b671468f5719bed30fff0ebcb2cfe16b09cf014 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jun 18 17:35:58 1996  Ian Lance Taylor  <ian@cygnus.com>
+
+       * core.c (core_create_line_syms): Use xstrdup rather than strdup.
+       * source.c (source_file_lookup_path): Likewise.
+
 Mon Apr  8 14:44:33 1996  Ian Lance Taylor  <ian@cygnus.com>
 
        * configure.in: Permit --enable-shared to specify a list of
index 3117599eba0807ffee8c6a68bfc1fb73cf568981..f2e341cb3b6e74dd0fb2588616bc05553c44260a 100644 (file)
@@ -589,7 +589,7 @@ DEFUN (core_create_line_syms, (core_bfd), bfd * core_bfd)
        }
 
       /* make name pointer a malloc'ed string: */
-      ltab.limit->name = strdup (ltab.limit->name);
+      ltab.limit->name = xstrdup (ltab.limit->name);
       ltab.limit->file = source_file_lookup_path (filename);
 
       ltab.limit->addr = core_text_sect->vma + offset;
index b0c6ecdb479219da3c6c3a07666fadb9242913aa..4421e3f757e4cf933eae2a066fec881b4e6b957c 100644 (file)
@@ -36,7 +36,7 @@ DEFUN (source_file_lookup_path, (path), const char *path)
 
       sf = (Source_File *) xmalloc (sizeof (*sf));
       memset (sf, 0, sizeof (*sf));
-      sf->name = strdup (path);
+      sf->name = xstrdup (path);
       sf->next = first_src_file;
       first_src_file = sf;
     }