Module: kamailio
Branch: master
Commit: 611cfede181f4cd61f576068708975efe5f66ffc
URL:
https://github.com/kamailio/kamailio/commit/611cfede181f4cd61f576068708975e…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-10-11T09:40:56+02:00
core: dns cache - check pointer and small formatting
---
Modified: src/core/dns_cache.c
---
Diff:
https://github.com/kamailio/kamailio/commit/611cfede181f4cd61f576068708975e…
Patch:
https://github.com/kamailio/kamailio/commit/611cfede181f4cd61f576068708975e…
---
diff --git a/src/core/dns_cache.c b/src/core/dns_cache.c
index e5e1b473ba..bf80c5fa16 100644
--- a/src/core/dns_cache.c
+++ b/src/core/dns_cache.c
@@ -4399,8 +4399,8 @@ int dns_cache_add_record(unsigned short type,
}
if (!rr_p) {
- for ( rr_p = rr_iter;
- *rr_p && (*rr_p != new_rr);
+ for (rr_p = rr_iter;
+ rr_p && *rr_p && (*rr_p != new_rr);
rr_p = &((*rr_p)->next)
);
}