[PATCH] libnfnetlink-1.0.0 iftable.c:nlif_open() has handler unregister error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



struct nlif_handle *nlif_open(void)
{
..........
    if (rtnl_handler_register(h->rtnl_handle, &h->ifadd_handler) < 0)
         goto err_close;
    if (rtnl_handler_register(h->rtnl_handle, &h->ifdel_handler) < 0)
         goto err_unregister;
    return h;
err_unregister:
    rtnl_handler_unregister(h->rtnl_handle, &h->ifdel_handler);
err_close:
    rtnl_close(h->rtnl_handle);
    free(h);
err:
    return NULL;
}


Here if was error after rtnl_handler_register(... ifdel_handler...) need to unregister the ifadd_handler,
but in err_unregister: try to unregister the the ifdel_handler.




Attachment: 2.patch
Description: Binary data


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux