Module: kamailio
Branch: master
Commit: 214eaaa5b7a0308fd7384a41e97b1204d71c93de
URL:
https://github.com/kamailio/kamailio/commit/214eaaa5b7a0308fd7384a41e97b120…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-07-12T09:45:53+02:00
rtpengine: check fd before closing
---
Modified: src/modules/rtpengine/rtpengine.c
---
Diff:
https://github.com/kamailio/kamailio/commit/214eaaa5b7a0308fd7384a41e97b120…
Patch:
https://github.com/kamailio/kamailio/commit/214eaaa5b7a0308fd7384a41e97b120…
---
diff --git a/src/modules/rtpengine/rtpengine.c b/src/modules/rtpengine/rtpengine.c
index 7b97a2ae1ee..8a2f6a08e8f 100644
--- a/src/modules/rtpengine/rtpengine.c
+++ b/src/modules/rtpengine/rtpengine.c
@@ -3770,7 +3770,8 @@ static char *send_rtpp_command(
return cp;
badproxy:
- close(fd);
+ if(fd >= 0)
+ close(fd);
return NULL;
}