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.
Assign type of a freed result structure to NULL to avoid reuse
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.
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?
Patch applied on OpenSIPS trunk.
Thanks and Regards,
Log in to post a comment.