提交 9b1ebff8 authored 作者: Michael Jerris's avatar Michael Jerris

CID:1024270 Dereference before null check

上级 7d5434f5
...@@ -120,10 +120,7 @@ static switch_status_t select_url(const char *user, ...@@ -120,10 +120,7 @@ static switch_status_t select_url(const char *user,
} }
switch_safe_free(sql); switch_safe_free(sql);
switch_cache_db_release_db_handle(&db);
if (db) {
switch_cache_db_release_db_handle(&db);
}
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
...@@ -5167,10 +5164,7 @@ SWITCH_STANDARD_API(show_function) ...@@ -5167,10 +5164,7 @@ SWITCH_STANDARD_API(show_function)
end: end:
switch_safe_free(mydata); switch_safe_free(mydata);
switch_cache_db_release_db_handle(&db);
if (db) {
switch_cache_db_release_db_handle(&db);
}
return status; return status;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论