diff options
author | Pedro Alves <palves@redhat.com> | 2010-08-17 21:12:32 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2010-08-17 21:12:32 +0000 |
commit | 0807b50c1a17fa98badf223a3f77ed94ed9b7452 (patch) | |
tree | d92fbc3b7e4fd759e045a3d02aaae7d0472f4823 /gdb/breakpoint.c | |
parent | f431efe54030450b082231080d76404f0f8064ae (diff) | |
download | gdb-0807b50c1a17fa98badf223a3f77ed94ed9b7452.zip gdb-0807b50c1a17fa98badf223a3f77ed94ed9b7452.tar.gz gdb-0807b50c1a17fa98badf223a3f77ed94ed9b7452.tar.bz2 |
* breakpoint.c (decref_bp_location): Assert the reference count is
sane.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index f23f518..6d59583 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -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; |