Skip to content

Commit d604b78

Browse files
author
Bogdan Degtyariov
committed
Fixed allocation of handles in my_use_result.c
1 parent 3815b1b commit d604b78

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/my_use_result.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ DECLARE_TEST(t_bug39878)
116116
int i;
117117
SQLINTEGER row_count= 0;
118118
SQLRETURN rc;
119+
DECLARE_BASIC_HANDLES(henv1, hdbc1, hstmt1);
119120

120121
ok_stmt(hstmt, SQLSetStmtAttr(hstmt, SQL_ATTR_CURSOR_TYPE,
121122
(SQLPOINTER)SQL_CURSOR_FORWARD_ONLY, 0));
@@ -184,9 +185,9 @@ DECLARE_TEST(t_bug39878)
184185
is(row_count == 0 || rc == SQL_ERROR);
185186

186187
// We re-connect to drop the table (as connection might be broken)
187-
free_basic_handles(&henv, &hdbc, &hstmt);
188-
alloc_basic_handles(&henv, &hdbc, &hstmt);
189-
ok_sql(hstmt, "DROP TABLE IF EXISTS t_bug39878");
188+
alloc_basic_handles(&henv1, &hdbc1, &hstmt1);
189+
ok_sql(hstmt1, "DROP TABLE IF EXISTS t_bug39878");
190+
free_basic_handles(&henv1, &hdbc1, &hstmt1);
190191

191192
return OK;
192193
}

0 commit comments

Comments
 (0)