]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: fix use of free memory by update_rsclient
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 5 Aug 2010 17:26:31 +0000 (10:26 -0700)
committerPaul Jakma <paul@quagga.net>
Mon, 21 Mar 2011 13:15:32 +0000 (13:15 +0000)
commit7badc26301c8063dc2c6f171c11f9af4f3d0df20
tree32ccf03522bacb163529e00c10df4798e5365808
parent368473f6120ff295253bcc0d774c6bd75d8cf98b
bgpd: fix use of free memory by update_rsclient

* bgp_route.c: (bgp_static_update_rsclient) BGP sometimes crashes when
  removing route server client because of use after free.

  The code to update rsclient created a local static copy of bgp attributes
  but neglected to handle the extra information pointer.  The extra
  information was getting freed by bgp_attr_unintern() and reused later when
  the copy was passed to bgp_attr_intern().

  The fix is to use the attr_dup function to create a copy of the extra
  information, then clean it up.
bgpd/bgp_route.c