[OpenSIPS-Devel] [ opensips-Patches-3535151 ] Fix freeing of a db SQL resource

SourceForge.net noreply at sourceforge.net
Tue Jul 3 09:38:36 CEST 2012


Patches item #3535151, was opened at 2012-06-14 03:00
Message generated for change (Comment added) made by peter_lemenkov
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3535151&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Peter Lemenkov (peter_lemenkov)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix freeing of a db SQL resource

Initial Comment:
We should mark type of the resource structure as NULL when we freeing it in order to prevent access to a NULL-ified fields in the future.

----------------------------------------------------------------------

>Comment By: Peter Lemenkov (peter_lemenkov)
Date: 2012-07-03 00:38

Message:
Hello Vlad!
Sorry for the late answer - I overlooked your message. Yes, indeed 0002
patch must be dropped (I'm going to remove it right now). We already moved
its logic into db_oracle (where it should be) - I'll post it later with the
rest of a db_oracle related stuff.

So how about applying only first one?

----------------------------------------------------------------------

Comment By: Vladut-Stefan Paiu (vladut-paiu)
Date: 2012-07-02 05:11

Message:
Hello,

The '0002-Free-columns-data-as-well.patch' doesn't seem to be ok, since it
also tries to pkg_free the actual column values. PKG allocation like this
only happens for db_oracle, other modules rely on their libraries to
allocate the actual column name and to also free it. Thus, the column data
freeing should be placed in db_oracle_free_result .

The second patch is ok, as it's a good idea to completely reset the column
info after freeing them.

Regards,
Vlad

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086412&aid=3535151&group_id=232389



More information about the Devel mailing list