ctdb-ipalloc: Drop a use of CTDB_NO_MEMORY_NULL()
authorMartin Schwenke <martin@meltin.net>
Mon, 23 May 2016 06:44:05 +0000 (16:44 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 4 Jul 2016 13:42:24 +0000 (15:42 +0200)
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_takeover.c

index bb54891..8183784 100644 (file)
@@ -1253,7 +1253,12 @@ create_merged_ip_list(struct ctdb_context *ctdb, struct ipalloc_state *ipalloc_s
                        struct public_ip_list *tmp_ip;
 
                        tmp_ip = talloc_zero(ctdb->ip_tree, struct public_ip_list);
-                       CTDB_NO_MEMORY_NULL(ctdb, tmp_ip);
+                       if (tmp_ip == NULL) {
+                               DEBUG(DEBUG_ERR,
+                                     (__location__ " out of memory\n"));
+                               return NULL;
+                       }
+
                        /* Do not use information about IP addresses hosted
                         * on other nodes, it may not be accurate */
                        if (public_ips->ip[j].pnn == i) {