diff options
author | jdp <jdp@FreeBSD.org> | 2004-04-29 01:37:11 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 2004-04-29 01:37:11 +0000 |
commit | 7dbcad4a61c5631e113998f459017583d21f33a0 (patch) | |
tree | c00f1315ad1a2ddcdf09939e54e37f2e635fe1e2 /sys/netgraph/ng_parse.c | |
parent | 3def6d86d9cfce88bdc69f3a65702fa265847972 (diff) | |
download | FreeBSD-src-7dbcad4a61c5631e113998f459017583d21f33a0.zip FreeBSD-src-7dbcad4a61c5631e113998f459017583d21f33a0.tar.gz |
Fix a memory leak in ng_get_string_token. A dynamically-allocated
buffer wasn't freed if the function failed.
MFC after: 3 days
Diffstat (limited to 'sys/netgraph/ng_parse.c')
-rw-r--r-- | sys/netgraph/ng_parse.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netgraph/ng_parse.c b/sys/netgraph/ng_parse.c index db77535..37c5cc4 100644 --- a/sys/netgraph/ng_parse.c +++ b/sys/netgraph/ng_parse.c @@ -1762,6 +1762,7 @@ ng_get_string_token(const char *s, int *startp, int *lenp, int *slenp) strcpy(p, v); } } + FREE(cbuf, M_NETGRAPH_PARSE); return (NULL); /* no closing quote */ } |