Bug Fix: Pass in dynamically allocated error code variable for flush request to avoid over-optimization in release mode.