lxc-user-nic: fix memleak
get_new_nicname() calls lxc_mkifname() which allocates memory and returns it to
the caller. The way get_new_nicname() and get_nic_if_avail() were implemented
they hid that fact by returning a boolean. That doesn't make sense. Let's
rather have them return a pointer to the allocated nic name which the caller
needs to free.
Signed-off-by:
Christian Brauner <christian.brauner@ubuntu.com>
Showing
Please
register
or
sign in
to comment