platform: fix memleak in _nl_sock_flush_data()

Fixes: 9a16ce0876
This commit is contained in:
Thomas Haller
2015-12-10 16:04:47 +01:00
parent 10b684b827
commit eeb7d20ee0

View File

@@ -2254,8 +2254,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;