Module: kamailio
Branch: master
Commit: 0b7a71070f3845e4c7e89e149a80b3db8872bb1e
URL:
https://github.com/kamailio/kamailio/commit/0b7a71070f3845e4c7e89e149a80b3d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2022-03-17T09:34:56+01:00
ims_qos: free result of getaddrinfo()
---
Modified: src/modules/ims_qos/ims_qos_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/0b7a71070f3845e4c7e89e149a80b3d…
Patch:
https://github.com/kamailio/kamailio/commit/0b7a71070f3845e4c7e89e149a80b3d…
---
diff --git a/src/modules/ims_qos/ims_qos_mod.c b/src/modules/ims_qos/ims_qos_mod.c
index 18d111eb67..08018d9c45 100644
--- a/src/modules/ims_qos/ims_qos_mod.c
+++ b/src/modules/ims_qos/ims_qos_mod.c
@@ -649,10 +649,13 @@ uint16_t check_ip_version(str ip)
return 0;
}
if (res->ai_family == AF_INET) {
+ freeaddrinfo(res);
return AF_INET;
} else if (res->ai_family == AF_INET6) {
+ freeaddrinfo(res);
return AF_INET6;
} else {
+ freeaddrinfo(res);
LM_ERR("unknown IP format \n");
return 0;
}