Fix a memory leak in ng_get_string_token. A dynamically-allocated

buffer wasn't freed if the function failed.

MFC after:	3 days
This commit is contained in:
John Polstra 2004-04-29 01:37:11 +00:00
parent 18f00b8a19
commit 0a4a8041ba
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128729

View File

@ -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 */
}