gattrib: Fix passing NULL to memcpy