Re: Memory leak in __SQLAllocHandle
Nick Gorham <[email protected]> Thu, 25 Dec 2014 10:38:02 +0000
| Newsgroups | gmane.comp.db.unixodbc.devel |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============1495209674==
Content-Type: multipart/alternative;
boundary="------------040704070400010904020800"
This is a multi-part message in MIME format.
--------------040704070400010904020800
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
On 25/12/14 03:15, xiaonan wrote:
> Hi Nick,
>
> Merry Xmas!
> In the line 874 and 1051 of __SQLAllocHandle
> function(DriverManager/SQLAllocHandle.c), I think the __release_stmt(
> statement ) should be called, like this:
> {
> __release_stmt( statement );
> *output_handle = SQL_NULL_HSTMT;
> }
> Else the memory will leak.
> Best Regards
> Nan Xiao
Yes, you are right. I have added the change to the tarball and will
check back into sourceforge svn later today.
--
Nick
--------------040704070400010904020800
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: 7bit
<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 25/12/14 03:15, xiaonan wrote:<br>
</div>
<blockquote
cite="mid:[email protected]"
type="cite">
<div
style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial">
<div>Hi Nick,</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>Merry
Xmas!</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>In
the line 874 and 1051 of __SQLAllocHandle
function(DriverManager/SQLAllocHandle.c), I think the
__release_stmt( statement ) should be called, like this:</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>__release_stmt(
statement );</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>*output_handle
= SQL_NULL_HSTMT;</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>}</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span>Else
the memory will leak.</div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span></div>
<div>Best Regards</div>
<div>Nan Xiao</div>
</div>
</blockquote>
<br>
Yes, you are right. I have added the change to the tarball and will
check back into sourceforge svn later today.<br>
<br>
-- <br>
Nick<br>
</body>
</html>
--------------040704070400010904020800--
--===============1495209674==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
unixODBC-dev mailing list
[email protected]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-dev
--===============1495209674==--