summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-04-19 07:08:34 +0000
committerAndrew Cagney <cagney@redhat.com>2000-04-19 07:08:34 +0000
commit4d67d7f9a85c28a6402b2d59bb5081903b223e9e (patch)
tree7365242182084a3779543058cb2ad8e9304463b5
parent78373bf046158b7c4cc0b999796f0abed73e9454 (diff)
downloadgdb-4d67d7f9a85c28a6402b2d59bb5081903b223e9e.tar.gz
* bcache.c (free_bcache): Do not free NULL.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/bcache.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2a1d5ae2df7..0d530ce4ded 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+Wed Apr 19 17:03:07 2000 Andrew Cagney <cagney@b1.cygnus.com>
+
+ From Philippe De Muyter <phdm@macqel.be>:
+ * bcache.c (free_bcache): Do not free NULL.
+
Wed Apr 19 16:37:47 2000 Andrew Cagney <cagney@b1.cygnus.com>
* TODO: Cleanup.
diff --git a/gdb/bcache.c b/gdb/bcache.c
index 766aff9c3bb..96c01ba4655 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -189,7 +189,8 @@ void
free_bcache (struct bcache *bcache)
{
obstack_free (&bcache->cache, 0);
- free (bcache->bucket);
+ if (bcache->bucket)
+ free (bcache->bucket);
/* This isn't necessary, but at least the bcache is always in a
consistent state. */