delete lobHandleTemp

Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/e1170bad
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/e1170bad
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/e1170bad

Branch: refs/heads/master
Commit: e1170bada9d91884dd6c2067274b2988e37a64f9
Parents: 443e538
Author: Weixin-Xu <[email protected]>
Authored: Thu Jul 12 09:37:25 2018 +0800
Committer: Weixin-Xu <[email protected]>
Committed: Thu Jul 12 09:37:25 2018 +0800

----------------------------------------------------------------------
 win-odbc64/odbcclient/drvr35/lob.cpp | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/e1170bad/win-odbc64/odbcclient/drvr35/lob.cpp
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/lob.cpp 
b/win-odbc64/odbcclient/drvr35/lob.cpp
index 44a93bf..ef620b0 100644
--- a/win-odbc64/odbcclient/drvr35/lob.cpp
+++ b/win-odbc64/odbcclient/drvr35/lob.cpp
@@ -62,6 +62,9 @@ namespace ODBC {
             lobHandleTemp, lobHandleLen + 1, extractLen, data) != SQL_SUCCESS)
         {
             pStatement->Close(SQL_CLOSE);
+            free(lobHandleTemp);
+            lobHandleTemp = NULL;
+
             return false;
         }
 
@@ -76,6 +79,8 @@ namespace ODBC {
         }
 
         pStatement->Close(SQL_CLOSE);
+        free(lobHandleTemp);
+        lobHandleTemp = NULL;
 
         return true;
     }

Reply via email to