Skip to content

Commit b2d5fde

Browse files
committed
Fixed close
1 parent 5d90c0f commit b2d5fde

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sdk/pinocchio/src/account_info.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,13 @@ impl AccountInfo {
587587
//
588588
// So we can zero out them directly.
589589
#[cfg(target_os = "solana")]
590-
sol_memset_(self.data_ptr().sub(48), 0, 48);
590+
sol_memset_(self.raw.data.get().cast::<u8>().sub(48), 0, 48);
591+
#[cfg(not(target_os = "solana"))]
592+
{
593+
*self.raw.owner.get() = Pubkey::default();
594+
self.raw.lamports.set(0);
595+
self.raw.data_len.set(0);
596+
}
591597
}
592598
}
593599

0 commit comments

Comments
 (0)