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); \