Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On Thu, 2012-07-19 at 12:43 +0200, Lionel Elie Mamane wrote:
On Wed, Jul 18, 2012 at 03:09:55PM -0400, Terrence Enger wrote:
Patch attached.  I think it as we discussed.

Thanks. Applied & pushed to master.

I split your patch into three commits:

 - avoid freeing the NULL handle

 - ODBMetaDataRS ctor: abort if statement handle allocation failed

 - stop some leaked statement handles


Note to self:
------------

    Difficulty writing a commit message may be telling you something
    interesting.  Listen to it hereafter, and stop bothering experts
    with work that you could do yourself!

In particular, in the "ODBMetaDataRS ctor: abort if statement handle
allocation failed" commit, I moved the abort (exception throwing) to
the top of the function instead of the bottom. At the bottom, it would
leak the allocation in m_pRowStatusArray, and a reference count in
m_pConnection (because acquire has already been called).

By contrast, the other initialisations done before, in the
initialisation list are safe: no heap allocation :)

Ah yes.  That is an important fix.


Again, thank you for all the help you have given me along the way to
this small code contribution.

Terry.



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.