diff --git a/program/src/extension/confidential_transfer/processor.rs b/program/src/extension/confidential_transfer/processor.rs index 9b46b070f..f1a0c5e14 100644 --- a/program/src/extension/confidential_transfer/processor.rs +++ b/program/src/extension/confidential_transfer/processor.rs @@ -171,7 +171,7 @@ fn reallocate_for_configure_account_with_registry<'a>( "account needs realloc, +{:?} bytes", needed_account_len - token_account_info.data_len() ); - token_account_info.realloc(needed_account_len, false)?; + token_account_info.realloc(needed_account_len, true)?; // if additional lamports needed to remain rent-exempt, transfer them let rent = Rent::get()?; diff --git a/program/src/extension/mod.rs b/program/src/extension/mod.rs index b98f77b1f..32d39f2ac 100644 --- a/program/src/extension/mod.rs +++ b/program/src/extension/mod.rs @@ -1463,7 +1463,7 @@ pub(crate) fn alloc_and_serialize previous_account_len { - account_info.realloc(new_account_len, false)?; + account_info.realloc(new_account_len, true)?; } let mut buffer = account_info.try_borrow_mut_data()?; if previous_account_len <= BASE_ACCOUNT_LENGTH { @@ -1511,7 +1511,7 @@ pub(crate) fn alloc_and_serialize_variable_len_extension< if previous_account_len < new_account_len { // account size increased, so realloc the account, then the TLV entry, then // write data - account_info.realloc(new_account_len, false)?; + account_info.realloc(new_account_len, true)?; let mut buffer = account_info.try_borrow_mut_data()?; if extension_already_exists { let mut state = PodStateWithExtensionsMut::::unpack(&mut buffer)?; @@ -1541,7 +1541,7 @@ pub(crate) fn alloc_and_serialize_variable_len_extension< if removed_bytes > 0 { // this is probably fine, but be safe and avoid invalidating references drop(buffer); - account_info.realloc(new_account_len, false)?; + account_info.realloc(new_account_len, true)?; } } Ok(()) diff --git a/program/src/extension/reallocate.rs b/program/src/extension/reallocate.rs index bd86f8dcf..ed7534d46 100644 --- a/program/src/extension/reallocate.rs +++ b/program/src/extension/reallocate.rs @@ -70,7 +70,7 @@ pub fn process_reallocate( "account needs realloc, +{:?} bytes", needed_account_len - token_account_info.data_len() ); - token_account_info.realloc(needed_account_len, false)?; + token_account_info.realloc(needed_account_len, true)?; // if additional lamports needed to remain rent-exempt, transfer them let rent = Rent::get()?; diff --git a/program/src/processor.rs b/program/src/processor.rs index 8b41ba86e..941d7aa64 100644 --- a/program/src/processor.rs +++ b/program/src/processor.rs @@ -2020,7 +2020,7 @@ fn delete_account(account_info: &AccountInfo) -> Result<(), ProgramError> { #[cfg(target_os = "solana")] fn delete_account(account_info: &AccountInfo) -> Result<(), ProgramError> { account_info.assign(&system_program::id()); - account_info.realloc(0, false) + account_info.realloc(0, true) } #[cfg(test)]