* breakpoint.c (decref_bp_location): Assert the reference count is

sane.
This commit is contained in:
Pedro Alves 2010-08-17 21:12:32 +00:00
parent f431efe540
commit 0807b50c1a
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2010-08-17 Pedro Alves <pedro@codesourcery.com>
PR breakpoints/11371
* breakpoint.c (decref_bp_location): Assert the reference count is
sane.
2010-08-17 Pedro Alves <pedro@codesourcery.com>
PR breakpoints/11371

View File

@ -5423,6 +5423,8 @@ incref_bp_location (struct bp_location *bl)
static void
decref_bp_location (struct bp_location **blp)
{
gdb_assert ((*blp)->refc > 0);
if (--(*blp)->refc == 0)
free_bp_location (*blp);
*blp = NULL;