platform: fix memleak in _nl_sock_flush_data()

Fixes: 9a16ce0876
(cherry picked from commit eeb7d20ee0)
This commit is contained in:
Thomas Haller 2015-12-10 16:04:47 +01:00
parent feaa4e5b9a
commit 5810502d19

View file

@ -416,8 +416,11 @@ _nl_sock_flush_data (struct nl_sock *sk)
{
int nle;
struct nl_cb *cb;
struct nl_cb *cb0;
cb = nl_cb_clone (nl_socket_get_cb (sk));
cb0 = nl_socket_get_cb (sk);
cb = nl_cb_clone (cb0);
nl_cb_put (cb0);
if (cb == NULL)
return -NLE_NOMEM;