summaryrefslogtreecommitdiff
path: root/gdb/bcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/bcache.c')
-rw-r--r--gdb/bcache.c3
1 files changed, 2 insertions, 1 deletions
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. */