chan_mgcp: Don't call close on fd -1.

ASTERISK-25220 #close

Change-Id: Ic48f3a82f51ada87f2fb0e016c9efe0ad56f1ee3
This commit is contained in:
Walter Doekes
2015-07-02 13:19:34 +02:00
parent 69bfa518a0
commit a5a262be78

View File

@@ -4995,7 +4995,9 @@ static int unload_module(void)
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);