X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcore%2Fobject.c;h=c39faf4aed2c89f684a3e2c0c947b0eba7fe2d18;hb=2faa3926a2836c0fe560bc73c7a8df4b9993b3be;hp=9101918654379a1ff41491df64187d399468d186;hpb=72a63cfb0e65bb575889b8dbee6648cafd6a52f2;p=sysdb.git diff --git a/src/core/object.c b/src/core/object.c index 9101918..c39faf4 100644 --- a/src/core/object.c +++ b/src/core/object.c @@ -149,6 +149,9 @@ sdb_object_deref(sdb_object_t *obj) if (obj->ref_cnt > 0) return; + /* we'd access free'd memory in case ref_cnt < 0 */ + assert(! obj->ref_cnt); + if (obj->type.destroy) obj->type.destroy(obj);