netgraph7: Plug item allocation leak in ng_socket.
authorNuno Antunes <nuno.antunes@gmail.com>
Fri, 20 Jun 2014 14:04:37 +0000 (15:04 +0100)
committerNuno Antunes <nuno.antunes@gmail.com>
Fri, 11 Jul 2014 09:17:10 +0000 (10:17 +0100)
commit3acc7e056d27f7465d34b79329b02ef7f1ab28c8
tree6433d54dc718204e1a4c525062f609036fefe77b
parent7e5f714468c5ebbac1d83060f56338f4e3f74f45
netgraph7: Plug item allocation leak in ng_socket.

* ng_connect_data() allocates a dummy item (which will not be sent) to
  address the destination node and obtain reference on it.  This item
  needs to be freed before returning from this function, so use
  ng_free_item() instead of the NOP NG_FREE_ITEM.
sys/netgraph7/socket/ng_socket.c