From: Byron Nikolaidis Date: Mon, 25 Oct 1999 01:11:44 +0000 (+0000) Subject: bug fix for large objects (free) X-Git-Tag: REL7_0~1269 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4c8e812b4ed3f50f4701169c4e302c7aeb8a548;p=postgresql bug fix for large objects (free) --- diff --git a/src/interfaces/odbc/bind.c b/src/interfaces/odbc/bind.c index 285fabd75a..67811f3926 100644 --- a/src/interfaces/odbc/bind.c +++ b/src/interfaces/odbc/bind.c @@ -124,7 +124,8 @@ static char *func="SQLBindParameter"; } if (stmt->parameters[ipar].EXEC_buffer) { - free(stmt->parameters[ipar].EXEC_buffer); + if (stmt->parameters[ipar].SQLType != SQL_LONGVARBINARY) + free(stmt->parameters[ipar].EXEC_buffer); stmt->parameters[ipar].EXEC_buffer = NULL; } diff --git a/src/interfaces/odbc/statement.c b/src/interfaces/odbc/statement.c index c11a0ab216..5aa540ec27 100644 --- a/src/interfaces/odbc/statement.c +++ b/src/interfaces/odbc/statement.c @@ -327,7 +327,8 @@ int i; } if (self->parameters[i].EXEC_buffer) { - free(self->parameters[i].EXEC_buffer); + if (self->parameters[i].SQLType != SQL_LONGVARBINARY) + free(self->parameters[i].EXEC_buffer); self->parameters[i].EXEC_buffer = NULL; } } @@ -875,7 +876,7 @@ QueryInfo qi; */ } else { - self->errornumber = STMT_BAD_ERROR; + self->errornumber = STMT_EXEC_ERROR; self->errormsg = "Error while executing the query"; }