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:
parent
18f00b8a19
commit
0a4a8041ba
@ -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 */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user