From: Ted Lemon Date: Thu, 28 Dec 2000 23:22:43 +0000 (+0000) Subject: - Always decrement the reference count on an object before dereferencing it, X-Git-Tag: V3-BETA-2-PATCH-12~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5985f55bf7a45792bdf4a91a20dd0fa3e3c2c84;p=thirdparty%2Fdhcp.git - Always decrement the reference count on an object before dereferencing it, so that if there's a dangling pointer, it's caught at dereference time. --- diff --git a/omapip/alloc.c b/omapip/alloc.c index 55eab6dd5..187c01069 100644 --- a/omapip/alloc.c +++ b/omapip/alloc.c @@ -481,6 +481,7 @@ isc_result_t omapi_object_dereference (omapi_object_t **h, if (outer_reference) omapi_object_dereference (&(*h) -> outer, file, line); + (*h) -> refcnt--; if (!(*h) -> type -> freer) rc_register (file, line, h, *h, 0); if ((*h) -> type -> destroy)