Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db_text fixes & live query #1014

Merged
merged 6 commits into from Mar 9, 2017
Merged

Conversation

lazedo
Copy link
Contributor

@lazedo lazedo commented Mar 3, 2017

No description provided.

@@ -117,15 +117,22 @@ int dbt_raw_query_select(db1_con_t* _h, str* _s, db1_res_t** _r)
result_cols = pkg_malloc(sizeof(db_key_t) * cols);
memset(result_cols, 0, sizeof(db_key_t) * cols);
for(n=0; n < cols; n++) {
result_cols[n] = &_tbc->colv[n]->name;
result_cols[n] = pkg_malloc(sizeof(str));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The result of mallocs are not checked if there is a valid pointer or NULL, which can happen on not enough memory available.

@miconda
Copy link
Member

miconda commented Mar 9, 2017

Thanks, it can be merged!

@miconda miconda merged commit e386b4d into kamailio:master Mar 9, 2017
@lazedo lazedo deleted the dbtext-fixes-master branch August 16, 2017 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants