Module: sip-router Branch: master Commit: 87df4928998f87f480a7a6cbfb1e5d8d8a3de836 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=87df4928...
Author: Marius Zbihlei marius.zbihlei@1and1.ro Committer: Marius Zbihlei marius.zbihlei@1and1.ro Date: Thu Jul 22 13:05:14 2010 +0300
modules/carrierroute: In case the reply tree in a fifo dump_routes command can't be executed, release the routing data.
S
---
modules/carrierroute/cr_fifo.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/carrierroute/cr_fifo.c b/modules/carrierroute/cr_fifo.c index d163f69..c323b8f 100644 --- a/modules/carrierroute/cr_fifo.c +++ b/modules/carrierroute/cr_fifo.c @@ -136,7 +136,7 @@ struct mi_root* dump_fifo (struct mi_root* cmd_tree, void *param) { struct mi_node* node = NULL; rpl_tree = init_mi_tree( 200, MI_OK_S, MI_OK_LEN); if(rpl_tree == NULL) - return 0; + goto error2; node = addf_mi_node_child( &rpl_tree->node, 0, 0, 0, "Printing routing information:"); if(node == NULL) goto error; @@ -165,8 +165,9 @@ struct mi_root* dump_fifo (struct mi_root* cmd_tree, void *param) { return rpl_tree;
error: - release_data (rd); free_mi_tree(rpl_tree); +error2: + release_data (rd); return 0; }