bgpd: fix coverity issue on aspath_filter_exclude_acl
CID
1566378 (#1-4 of 4): Use after free (USE_AFTER_FREE)76.
use_after_free: Using freed pointer cur_seg.
now the prev_seg pointer is set with always existaing values.
Link: https://scan7.scan.coverity.com/reports.htm#v39104/p13747/fileInstanceId=146858993&defectInstanceId=18968273&mergedDefectId=1566378&fileStart=1376&fileEnd=1625
Fixes: 4685db418e3a861205a28f975afeb9869f674337 (bgpd: add set as-path exclude acl-list command)
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>