From: Andrew Cagney Date: Wed, 19 Apr 2000 07:08:35 +0000 (+0000) Subject: * bcache.c (free_bcache): Do not free NULL. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=df02e9ed85c7f26e0d9c992225ccaab124939f0d;p=binutils-gdb.git * bcache.c (free_bcache): Do not free NULL. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f17ed0782c9..141a1f0aaaa 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Wed Apr 19 17:03:07 2000 Andrew Cagney + + From Philippe De Muyter : + * bcache.c (free_bcache): Do not free NULL. + Wed Apr 19 16:37:47 2000 Andrew Cagney * 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. */