aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-12-07 11:52:16 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-12-10 12:16:23 +0100
commit01d315f19c0ffdbbbd11d425b067169ce08285e9 (patch)
tree7dc793d69874e0e62e5116dc3aaadab12dbb600f
parent3d4d79d89090fcbe97de9b10aa9f638461648218 (diff)
mgcp: We do not need to check for talloc_free
Simplify the code and remove null check for the two strings.
-rw-r--r--openbsc/src/libmgcp/mgcp_protocol.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index 54af15b7b..86f361c97 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -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);