summaryrefslogtreecommitdiff
path: root/bgpd/bgp_ecommunity.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-05-16 09:54:03 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-05-16 09:59:06 -0400
commitc7ee6c35cb2c7149f6a3ab53cea4d7e212ebe0f6 (patch)
treef2ebef36552e7cf9a95b281c21bbacc37c7d5a15 /bgpd/bgp_ecommunity.h
parent4b85140f5a6eb5b5c2f425940b585a8ace1253e0 (diff)
bgpd: Fix memory leak of ecommunity_ecom2str
The creation of a temporary string for the ecommunity was being leaked when debugging is enabled. Write a bit of code to prevent this. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_ecommunity.h')
-rw-r--r--bgpd/bgp_ecommunity.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bgpd/bgp_ecommunity.h b/bgpd/bgp_ecommunity.h
index 88bdb5e2ae..2f59308d65 100644
--- a/bgpd/bgp_ecommunity.h
+++ b/bgpd/bgp_ecommunity.h
@@ -156,6 +156,7 @@ extern void ecommunity_unintern(struct ecommunity **);
extern unsigned int ecommunity_hash_make(void *);
extern struct ecommunity *ecommunity_str2com(const char *, int, int);
extern char *ecommunity_ecom2str(struct ecommunity *, int, int);
+extern void ecommunity_strfree(char **s);
extern int ecommunity_match(const struct ecommunity *,
const struct ecommunity *);
extern char *ecommunity_str(struct ecommunity *);