Skip to content

Commit 86324fd

Browse files
authored
Avoid redundant array alloc when TryReadSqlValueInternal for SQLVECTOR (#4156)
1 parent 407db24 commit 86324fd

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParser.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7447,8 +7447,7 @@ internal TdsOperationStatus TryReadSqlValueInternal(SqlBuffer value, byte tdsTyp
74477447
{
74487448
// Note: Better not come here with plp data!!
74497449
Debug.Assert(length <= TdsEnums.MAXSIZE);
7450-
byte[] b = new byte[length];
7451-
result = stateObj.TryReadByteArrayWithContinue(length, isPlp: false, out b);
7450+
result = stateObj.TryReadByteArrayWithContinue(length, isPlp: false, out byte[] b);
74527451
if (result != TdsOperationStatus.Done)
74537452
{
74547453
return result;

0 commit comments

Comments
 (0)