aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r--gdb/buildsym.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 1e56954..21020be 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -389,7 +389,7 @@ start_subfile (name, dirname)
current_subfile = subfile;
/* Save its name and compilation directory name */
- subfile->name = strdup (name);
+ subfile->name = (name == NULL)? NULL : strdup (name);
subfile->dirname = (dirname == NULL) ? NULL : strdup (dirname);
/* Initialize line-number recording for this subfile. */