From de8ee0e21e34883b9eb72b6fca4122560bfff0ae Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 10 Nov 2008 20:53:43 +0000 Subject: [PATCH] * gdbtypes.c (copy_type_recursive): Clear new fields. --- gdb/ChangeLog | 4 ++++ gdb/gdbtypes.c | 1 + 2 files changed, 5 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 090a9424fdf..b2d74fc8d90 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2008-11-10 Tom Tromey + + * gdbtypes.c (copy_type_recursive): Clear new fields. + 2008-11-10 Tom Tromey * cli/cli-cmds.c (source_script): Clean up full_pathname. Run diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index b5a5de0e5ee..5b9d0e873ad 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -2977,6 +2977,7 @@ copy_type_recursive (struct objfile *objfile, nfields = TYPE_NFIELDS (type); TYPE_FIELDS (new_type) = xmalloc (sizeof (struct field) * nfields); + memset (TYPE_FIELDS (new_type), 0, sizeof (struct field) * nfields); for (i = 0; i < nfields; i++) { TYPE_FIELD_ARTIFICIAL (new_type, i) = -- 2.30.2