ctdb-daemon: Drop use of strdup(3) and free(3) when releasing IP
authorMartin Schwenke <martin@meltin.net>
Sat, 20 Aug 2016 10:02:44 +0000 (20:02 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 8 Sep 2016 04:57:20 +0000 (06:57 +0200)
commitf63fe7c3b9e66ff2d4048b071e651035cde394b5
tree940a7f50a3a99ffbf297c205c522a032aa7d6f25
parentd1c30aba04dd25fd9abc04005c9aff300ca79c4a
ctdb-daemon: Drop use of strdup(3) and free(3) when releasing IP

If anything should be used here it should be talloc functions.
However, this is a remnant from when ctdb_sys_find_ifname() was used
here and, for some reason, it used strdup(3).

In this case the interface string doesn't actually need to be copied.
The only use of it is when ctdb_event_script_callback_v() uses it with
the format string in a call to talloc_vasprintf().  In the same
context the IP address isn't copied.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ctdb_takeover.c