From 0a4a8041bad966ff5e5b3ee4bf4a39af612f9f43 Mon Sep 17 00:00:00 2001 From: John Polstra Date: Thu, 29 Apr 2004 01:37:11 +0000 Subject: Fix a memory leak in ng_get_string_token. A dynamically-allocated buffer wasn't freed if the function failed. MFC after: 3 days --- sys/netgraph/ng_parse.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/netgraph/ng_parse.c') diff --git a/sys/netgraph/ng_parse.c b/sys/netgraph/ng_parse.c index db77535aa434..37c5cc415fcd 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 */ } -- cgit v1.3