From 1e2ededb07844d2d1d361a27f9181013aac4e1fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Thu, 29 Sep 2022 10:46:36 +0200 Subject: [PATCH] Add missing DbC check for name##_detach in ISC_REFCOUNT_IMPL macro The detach function in the ISC_REFCOUNT_IMPL macro was missing DbC checks, add them. --- lib/isc/include/isc/refcount.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/isc/include/isc/refcount.h b/lib/isc/include/isc/refcount.h index bf0a66e32b..e33cd7df25 100644 --- a/lib/isc/include/isc/refcount.h +++ b/lib/isc/include/isc/refcount.h @@ -174,6 +174,7 @@ isc_refcount_decrement(isc_refcount_t *target) { } \ \ void name##_detach(name##_t **ptrp) { \ + REQUIRE(ptrp != NULL && *ptrp != NULL); \ name##_t *ptr = *ptrp; \ *ptrp = NULL; \ name##_unref(ptr); \