freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib
- Date: Thu, 17 Feb 2005 15:32:22 +0100
> > Fixed... tds_cursor_close can deallocare cursor,
> > in this case reset cmd->cursor too.
>
> I've looked at your fix. If it works, it's as good as I could come up
> with at the moment....
> I may take a close look at the cursor code, with the benefit of
> hindsight.
> I'd prefer to reset cmd->cursor when we receive back the DONE
> status for
> the cursor dealloc/close-with-dealloc
> I can't see a way to do this yet, but I may come up with something.
>
> Thanks for your help,
>
> Bill
>
IMO if you free cursors in libTDS you should not attempt to keep
pointers or check some conditions and free cursor by yourself, you are
going to have pointers to garbage, double free and other memory errors
(heap corruption and so on).
Current code (cursor deallocation == free) is safe however as you noted
you have cursors in libTDS that are not in upper layer libraries.
Another solution is that libTDS notify upper layer of deallocation and
let upper layer libraries to it cleanup (or even free cursor)...
freddy77
-
[freetds] [ freetds-Patches-1120675 ] new features in ctlib,
SourceForge.net, 02/11/2005
- <Possible follow-up(s)>
-
RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib,
Thompson, Bill D (London), 02/11/2005
- RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib, Frediano Ziglio, 02/11/2005
- RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib, ZIGLIO, Frediano, VF-IT, 02/14/2005
-
RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib,
Thompson, Bill D (London), 02/16/2005
-
RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib,
Frediano Ziglio, 02/16/2005
- RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib, Frediano Ziglio, 02/16/2005
-
RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib,
Frediano Ziglio, 02/16/2005
- [freetds] [ freetds-Patches-1120675 ] new features in ctlib, SourceForge.net, 02/17/2005
- RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib, Thompson, Bill D (London), 02/17/2005
- RE: [freetds] [ freetds-Patches-1120675 ] new features in ctlib, ZIGLIO, Frediano, VF-IT, 02/17/2005
Archive powered by MHonArc 2.6.24.