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

SourceForge.net noreply at sourceforge.net
Mon Jul 2 14:11:43 CEST 2012


Patches item #3535151, was opened at 2012-06-14 03:00
Message generated for change (Comment added) made by vladut-paiu
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: 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