Skip to content

Commit

Permalink
Fix calling FreeColumns multiple times resulting in SIGABRT (#980)
Browse files Browse the repository at this point in the history
Signed-off-by: Lasse Hyldahl Jensen <[email protected]>
  • Loading branch information
lasse-it authored Jan 31, 2024
1 parent b168496 commit 3045f4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/odbc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ Column* ODBC::GetColumns(SQLHSTMT hStmt, short* colCount)
* FreeColumns
*/

void ODBC::FreeColumns(Column* columns, short* colCount)
void ODBC::FreeColumns(Column* &columns, short* colCount)
{
DEBUG_PRINTF("ODBC::FreeColumns - Entry\n");
for(int i = 0; i < *colCount; i++) {
Expand Down
2 changes: 1 addition & 1 deletion src/odbc.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class ODBC : public Nan::ObjectWrap {

static NAN_MODULE_INIT(Init);
static Column* GetColumns(SQLHSTMT hStmt, short* colCount);
static void FreeColumns(Column* columns, short* colCount);
static void FreeColumns(Column* &columns, short* colCount);
static v8::Local<Value> GetColumnValue(SQLHSTMT hStmt, Column column, uint16_t* buffer, size_t bufferLength);
static Local<Value> GetOutputParameter(Parameter *prm);
static Local<Object> GetRecordTuple (SQLHSTMT hStmt, Column* columns, short* colCount, uint16_t* buffer, size_t bufferLength);
Expand Down

0 comments on commit 3045f4f

Please sign in to comment.