Module: kamailio
Branch: master
Commit: 6438573ce2d138d83cc1fa7cd88834c48d623ac6
URL:
https://github.com/kamailio/kamailio/commit/6438573ce2d138d83cc1fa7cd88834c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-11-23T10:51:56+01:00
core: safety check for freeaddrinfo() param on log_init()
- GH #3281
---
Modified: src/core/dprint.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6438573ce2d138d83cc1fa7cd88834c…
Patch:
https://github.com/kamailio/kamailio/commit/6438573ce2d138d83cc1fa7cd88834c…
---
diff --git a/src/core/dprint.c b/src/core/dprint.c
index ff63fd9ff1..0f1eef773d 100644
--- a/src/core/dprint.c
+++ b/src/core/dprint.c
@@ -480,7 +480,9 @@ void log_init(void)
log_fqdn = strdup (info->ai_canonname);
}
- freeaddrinfo (info);
+ if(info!=NULL) {
+ freeaddrinfo (info);
+ }
dprint_init_colors();
}