X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=lib%2Fref.c;h=02d2c4e9bf914fe3467600d81ea4d5abd13058d9;hb=9769184ff689394216fa6ae61142c946033f5d94;hp=153146af4622484e2c6437220c364012d36fb37e;hpb=b1912a652c31a5700b07500b0b1dab274d06ea17;p=babeltrace.git diff --git a/lib/ref.c b/lib/ref.c index 153146af..02d2c4e9 100644 --- a/lib/ref.c +++ b/lib/ref.c @@ -70,6 +70,11 @@ void bt_put(void *ptr) return; } + if (BT_LOG_ON_WARN && unlikely(bt_object_get_ref_count(obj) == 0)) { + BT_LOGW("Decrementing a reference count set to 0: addr=%p", + ptr); + } + BT_LOGV("Decrementing object's reference count: %lu -> %lu: " "addr=%p, cur-count=%lu, new-count=%lu", obj->ref_count.count, obj->ref_count.count - 1,