mgcp: We do not need to check for talloc_free

Simplify the code and remove null check for the two strings.
This commit is contained in:
Holger Hans Peter Freyther 2012-12-07 11:52:16 +01:00
parent 3d4d79d890
commit 01d315f19c
1 changed files with 4 additions and 8 deletions

View File

@ -996,15 +996,11 @@ void mgcp_free_endp(struct mgcp_endpoint *endp)
endp->ci = CI_UNUSED;
endp->allocated = 0;
if (endp->callid) {
talloc_free(endp->callid);
endp->callid = NULL;
}
talloc_free(endp->callid);
endp->callid = NULL;
if (endp->local_options) {
talloc_free(endp->local_options);
endp->local_options = NULL;
}
talloc_free(endp->local_options);
endp->local_options = NULL;
mgcp_rtp_end_reset(&endp->bts_end);
mgcp_rtp_end_reset(&endp->net_end);