Skip to content

Commit

Permalink
[nozzle] don't leak memory on error
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Aug 21, 2019
1 parent 6d06efc commit 7ab467b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libnozzle/libnozzle.c
Expand Up @@ -252,7 +252,8 @@ static int _set_ip(nozzle_t nozzle,
addr = rtnl_addr_alloc();
if (!addr) {
errno = ENOMEM;
return -1;
err = -1;
goto out;
}

if (rtnl_link_alloc_cache(lib_cfg.nlsock, AF_UNSPEC, &cache) < 0) {
Expand Down

0 comments on commit 7ab467b

Please sign in to comment.