[asterisk-commits] chan mgcp: Don't call close on fd -1. (asterisk[11])
    SVN commits to the Asterisk project 
    asterisk-commits at lists.digium.com
       
    Thu Jul  2 07:50:28 CDT 2015
    
    
  
Joshua Colp has submitted this change and it was merged.
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(-)
Approvals:
  Anonymous Coward #1000019: Verified
  Matt Jordan: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 7e5cc92..7154f43 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -4944,7 +4944,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/768
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic48f3a82f51ada87f2fb0e016c9efe0ad56f1ee3
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Walter Doekes <walter+asterisk at wjd.nu>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
    
    
More information about the asterisk-commits
mailing list