[Asterisk-code-review] chan mgcp: Don't call close on fd -1. (asterisk[master])
Walter Doekes
asteriskteam at digium.com
Thu Jul 2 06:22:18 CDT 2015
Walter Doekes has uploaded a new change for review.
https://gerrit.asterisk.org/770
Change subject: chan_mgcp: Don't call close on fd -1.
......................................................................
chan_mgcp: Don't call close on fd -1.
ASTERISK-25220 #close
Change-Id: Ic48f3a82f51ada87f2fb0e016c9efe0ad56f1ee3
---
M channels/chan_mgcp.c
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/70/770/1
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 16d3c65..d9e182c 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -5007,7 +5007,9 @@
return -1;
}
- close(mgcpsock);
+ if (mgcpsock > -1) {
+ close(mgcpsock);
+ }
ast_rtp_glue_unregister(&mgcp_rtp_glue);
ast_cli_unregister_multiple(cli_mgcp, sizeof(cli_mgcp) / sizeof(struct ast_cli_entry));
ast_sched_context_destroy(sched);
--
To view, visit https://gerrit.asterisk.org/770
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic48f3a82f51ada87f2fb0e016c9efe0ad56f1ee3
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Walter Doekes <walter+asterisk at wjd.nu>
More information about the asterisk-code-review
mailing list