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
(cherry picked from commit 217ca75)
  • Loading branch information
AlexPeshkoff committed Sep 30, 2022
1 parent 4d0e5e0 commit 848b528
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 @@ -3488,6 +3488,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 848b528

Please sign in to comment.