diff options
author | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2011-09-21 11:42:19 +1000 |
---|---|---|
committer | Ronnie Sahlberg <ronniesahlberg@gmail.com> | 2011-09-21 11:42:19 +1000 |
commit | 4587bdb052214645f9174c7523fb2422725a95d8 (patch) | |
tree | 561fa4114841c9a28681b32cd9f3c0c48170e532 | |
parent | e3cdf429b62314aaf92177a13478f5f9d2019246 (diff) | |
download | samba-4587bdb052214645f9174c7523fb2422725a95d8.tar.gz samba-4587bdb052214645f9174c7523fb2422725a95d8.tar.xz samba-4587bdb052214645f9174c7523fb2422725a95d8.zip |
when checking that the interfaces exist in ctdb_add_public_address()
cant talloc off vnn since it is not yet initialized and might not always be NULL
(This used to be ctdb commit 3d37be3e2bfb61ede824028aeebaa18ba304faae)
-rw-r--r-- | ctdb/server/ctdb_takeover.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c index 4114b40f83..29f7acd5b7 100644 --- a/ctdb/server/ctdb_takeover.c +++ b/ctdb/server/ctdb_takeover.c @@ -880,15 +880,15 @@ static int ctdb_add_public_address(struct ctdb_context *ctdb, int i; int ret; - tmp = talloc_strdup(vnn, ifaces); + tmp = strdup(ifaces); for (iface = strtok(tmp, ","); iface; iface = strtok(NULL, ",")) { if (!ctdb_sys_check_iface_exists(iface)) { DEBUG(DEBUG_CRIT,("Interface %s does not exist. Can not add public-address : %s\n", iface, ctdb_addr_to_str(addr))); - talloc_free(tmp); + free(tmp); return -1; } } - talloc_free(tmp); + free(tmp); /* Verify that we dont have an entry for this ip yet */ for (vnn=ctdb->vnn;vnn;vnn=vnn->next) { |