bgpd: Fix 'struct peer' memory leaks

peer_delete has been written to handle the peer->group pointer and
to remove the peer from the peer group if it exists upon deletion being
called.  Shutdown/deletion Code was intentionally setting the peer-group
to NULL prior to calling peer_delete.  This leaked the memory associated
with the peer->group because of refcnt accounting.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
1 file changed