qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmur...@apache.org
Subject qpid-dispatch git commit: DISPATCH-245 - Remove zero checks before freeing pointers
Date Fri, 08 Apr 2016 20:10:21 GMT
Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 1dd0f4194 -> cc4acb147


DISPATCH-245 - Remove zero checks before freeing pointers


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/cc4acb14
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/cc4acb14
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/cc4acb14

Branch: refs/heads/master
Commit: cc4acb147f2348fdff8e3c249516e80b503fcdae
Parents: 1dd0f41
Author: Ganesh Murthy <gmurthy@redhat.com>
Authored: Fri Apr 8 16:10:13 2016 -0400
Committer: Ganesh Murthy <gmurthy@redhat.com>
Committed: Fri Apr 8 16:10:13 2016 -0400

----------------------------------------------------------------------
 src/router_config.c | 52 ++++++++++++++++--------------------------------
 1 file changed, 17 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/cc4acb14/src/router_config.c
----------------------------------------------------------------------
diff --git a/src/router_config.c b/src/router_config.c
index c512a31..1c37851 100644
--- a/src/router_config.c
+++ b/src/router_config.c
@@ -205,12 +205,9 @@ qd_error_t qd_router_configure_lrp(qd_router_t *router, qd_entity_t *entity)
 
     } while (0);
 
-    if (prefix)
-        free(prefix);
-    if (connector)
-        free(connector);
-    if (direction)
-        free(direction);
+    free(prefix);
+    free(connector);
+    free(direction);
 
     return qd_error_code();
 }
@@ -288,12 +285,9 @@ qd_error_t qd_router_configure_address(qd_router_t *router, qd_entity_t
*entity)
 
     } while(0);
 
-    if (name)
-        free(name);
-    if (prefix)
-        free(prefix);
-    if (distrib)
-        free(distrib);
+    free(name);
+    free(prefix);
+    free(distrib);
 
     return qd_error_code();
 }
@@ -375,18 +369,12 @@ qd_error_t qd_router_configure_link_route(qd_router_t *router, qd_entity_t
*enti
 
     } while(0);
 
-    if (name)
-        free(name);
-    if (prefix)
-        free(prefix);
-    if (container)
-        free(container);
-    if (c_name)
-        free(c_name);
-    if (distrib)
-        free(distrib);
-    if (dir)
-        free(dir);
+    free(name);
+    free(prefix);
+    free(container);
+    free(c_name);
+    free(distrib);
+    free(dir);
 
     return qd_error_code();
 }
@@ -466,17 +454,11 @@ qd_error_t qd_router_configure_auto_link(qd_router_t *router, qd_entity_t
*entit
 
     } while (0);
 
-
-    if (name)
-        free(name);
-    if (addr)
-        free(addr);
-    if (dir)
-        free(dir);
-    if (container)
-        free(container);
-    if (c_name)
-        free(c_name);
+    free(name);
+    free(addr);
+    free(dir);
+    free(container);
+    free(c_name);
 
     return qd_error_code();
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message