[bgpd] CID#62 fix double-free, use-after-free in community_str2com

2006-05-08 Paul Jakma <paul.jakma@sun.com>

	* bgp_community.c: (community_str2com) Coverity CID#62, fix
	  double-free, use-after-free.
diff --git a/bgpd/bgp_community.c b/bgpd/bgp_community.c
index b419a20..07b8cf8 100644
--- a/bgpd/bgp_community.c
+++ b/bgpd/bgp_community.c
@@ -596,7 +596,7 @@
 	default:
 	  if (com)
 	    community_free (com);
-	  break;
+	  return NULL;
 	}
     } while (str);