Skip to content

Commit c4c8e81

Browse files
author
Byron Nikolaidis
committed
bug fix for large objects (free)
1 parent eae456c commit c4c8e81

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/interfaces/odbc/bind.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ static char *func="SQLBindParameter";
124124
}
125125

126126
if (stmt->parameters[ipar].EXEC_buffer) {
127-
free(stmt->parameters[ipar].EXEC_buffer);
127+
if (stmt->parameters[ipar].SQLType != SQL_LONGVARBINARY)
128+
free(stmt->parameters[ipar].EXEC_buffer);
128129
stmt->parameters[ipar].EXEC_buffer = NULL;
129130
}
130131

src/interfaces/odbc/statement.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ int i;
327327
}
328328

329329
if (self->parameters[i].EXEC_buffer) {
330-
free(self->parameters[i].EXEC_buffer);
330+
if (self->parameters[i].SQLType != SQL_LONGVARBINARY)
331+
free(self->parameters[i].EXEC_buffer);
331332
self->parameters[i].EXEC_buffer = NULL;
332333
}
333334
}
@@ -875,7 +876,7 @@ QueryInfo qi;
875876
*/
876877
}
877878
else {
878-
self->errornumber = STMT_BAD_ERROR;
879+
self->errornumber = STMT_EXEC_ERROR;
879880
self->errormsg = "Error while executing the query";
880881
}
881882

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy