v.23.11Bug Fix

Fix race condition in memory allocation failure

Fix rare race condition related to Memory allocation failure #56303 (alesapin).