[PATCH OLK-6.6 3/4] cleanup: Provide retain_and_null_ptr()