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