File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change 22 "author" : " SQL ANYWHERE " ,
33 "name" : " sqlanywhere" ,
44 "description" : " SQL Anywhere JavaScript Driver." ,
5- "version" : " 1.0.10 " ,
5+ "version" : " 1.0.11 " ,
66 "repository" : {
77 "url" : " https://github.com/sqlanywhere/node-sqlanywhere"
88 },
Original file line number Diff line number Diff line change @@ -186,9 +186,7 @@ void executeAfter( uv_work_t *req )
186186 scoped_lock lock ( baton->obj ->conn_mutex );
187187
188188 if ( baton->sqlany_stmt != NULL && baton->prepared_stmt ) {
189- if ( api.initialized ) {
190- api.sqlany_free_stmt ( baton->sqlany_stmt );
191- }
189+ // the StmtObject will free sqlany_stmt
192190 baton->sqlany_stmt = NULL ;
193191 }
194192
@@ -373,6 +371,7 @@ NODE_API_FUNC( Connection::exec )
373371
374372 if ( baton->sqlany_stmt != NULL ) {
375373 api.sqlany_free_stmt ( baton->sqlany_stmt );
374+ baton->sqlany_stmt = NULL ;
376375 }
377376
378377 delete baton;
@@ -774,8 +773,6 @@ void Connection::disconnectWork( uv_work_t *req )
774773 }
775774 // Must free the connection object or there will be a memory leak
776775 api.sqlany_free_connection ( baton->obj ->conn );
777-
778-
779776 baton->obj ->conn = NULL ;
780777 openConnections--;
781778
You can’t perform that action at this time.
0 commit comments