diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-06-20 14:27:59 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-08-31 19:06:56 +0200 |
commit | 5f1011ac0ad676d1e7eaba14d1384180e98fb93e (patch) | |
tree | 4c4b37623d138c593d4d9220e4444d39fde2abd9 /libports/notify-msg-accepted.c | |
parent | 334801c52c9844c06eacbe2e3af65852f7412e3c (diff) |
include: detect use-after-free errors using the reference counts
* include/refcount.h (refcount_init): There must be at least one
reference at initialization time.
(refcounts_init): Likewise.
(refcount_unsafe_ref): New function retaining the previous
functionality of refcount_ref. It is occasionally useful to raise the
reference count again after it dropped to zero.
(refcounts_unsafe_ref): Likewise.
(refcounts_unsafe_weak_ref): Likewise.
(refcount_ref): Detect use-after-free errors.
(refcounts_ref): Likewise.
(refcounts_ref_weak): Likewise.
* libtrivfs/protid-clean.c (trivfs_clean_protid): Use refcount_unsafe_ref.
Diffstat (limited to 'libports/notify-msg-accepted.c')
0 files changed, 0 insertions, 0 deletions