[sr-dev] git:master:45c4c1b1: lrkproxy: init variable and check to fix compiler warnings
Daniel-Constantin Mierla
miconda at gmail.com
Tue Oct 4 16:12:42 CEST 2022
Module: kamailio
Branch: master
Commit: 45c4c1b1851212bfc8e0c84d4e1a62cd89ad7b56
URL: https://github.com/kamailio/kamailio/commit/45c4c1b1851212bfc8e0c84d4e1a62cd89ad7b56
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2022-10-04T16:12:17+02:00
lrkproxy: init variable and check to fix compiler warnings
---
Modified: src/modules/lrkproxy/lrkproxy.c
---
Diff: https://github.com/kamailio/kamailio/commit/45c4c1b1851212bfc8e0c84d4e1a62cd89ad7b56.diff
Patch: https://github.com/kamailio/kamailio/commit/45c4c1b1851212bfc8e0c84d4e1a62cd89ad7b56.patch
---
diff --git a/src/modules/lrkproxy/lrkproxy.c b/src/modules/lrkproxy/lrkproxy.c
index e673ffed63..cdd69bf75e 100644
--- a/src/modules/lrkproxy/lrkproxy.c
+++ b/src/modules/lrkproxy/lrkproxy.c
@@ -1290,7 +1290,7 @@ static struct lrkp_set * select_lrkp_set(int id_set ){
struct lrkp_node *select_lrkp_node(int do_test)
{
- struct lrkp_node* node;
+ struct lrkp_node* node = NULL;
int was_forced;
int was_forced2;
@@ -1391,7 +1391,7 @@ struct lrkp_node *select_lrkp_node(int do_test)
}
found:
- if (do_test) {
+ if (do_test && node) {
// //todo...
node->ln_enable = lrkp_test(node);
if (!node->ln_enable)
More information about the sr-dev
mailing list