Skip to content

Commit

Permalink
Fixed #7262: Repeated op_batch_create leaks the batch
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexPeshkoff committed Sep 30, 2022
1 parent 9c703c0 commit 217ca75
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/remote/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3489,6 +3489,10 @@ void rem_port::batch_create(P_BATCH_CREATE* batch, PACKET* sendL)
getHandle(statement, batch->p_batch_statement);
statement->checkIface();

// Check for previously opened batch for the statement
if (statement->rsr_batch)
Arg::Gds(isc_batch_open).raise();

const ULONG blr_length = batch->p_batch_blr.cstr_length;
const UCHAR* blr = batch->p_batch_blr.cstr_address;
if (!blr)
Expand Down

0 comments on commit 217ca75

Please sign in to comment.