From d75ea6de3dcd6090e4263f748724c6357d760a9f Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 18 Jun 1996 21:37:38 +0000 Subject: [PATCH] * core.c (core_create_line_syms): Use xstrdup rather than strdup. * source.c (source_file_lookup_path): Likewise. --- gprof/ChangeLog | 5 +++++ gprof/core.c | 2 +- gprof/source.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gprof/ChangeLog b/gprof/ChangeLog index 8551292f67c..8b671468f57 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,3 +1,8 @@ +Tue Jun 18 17:35:58 1996 Ian Lance Taylor + + * 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 * configure.in: Permit --enable-shared to specify a list of diff --git a/gprof/core.c b/gprof/core.c index 3117599eba0..f2e341cb3b6 100644 --- a/gprof/core.c +++ b/gprof/core.c @@ -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; diff --git a/gprof/source.c b/gprof/source.c index b0c6ecdb479..4421e3f757e 100644 --- a/gprof/source.c +++ b/gprof/source.c @@ -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; } -- 2.30.2