diff options
author | glebius <glebius@FreeBSD.org> | 2006-01-14 21:28:30 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2006-01-14 21:28:30 +0000 |
commit | 60e9860657887a523d9609a83794d63cd8324346 (patch) | |
tree | 6c9c1460a681d6b8b169f53e7bca2a2ea4b62755 /sys/netgraph/ng_parse.c | |
parent | 729a1ef9f4b0f89ac3f42fe019ae65f987d63958 (diff) | |
download | FreeBSD-src-60e9860657887a523d9609a83794d63cd8324346.zip FreeBSD-src-60e9860657887a523d9609a83794d63cd8324346.tar.gz |
Make code simplier fixing memory leak.
Found with: Coverity Prevent(tm)
Diffstat (limited to 'sys/netgraph/ng_parse.c')
-rw-r--r-- | sys/netgraph/ng_parse.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netgraph/ng_parse.c b/sys/netgraph/ng_parse.c index 5ec271d..5dd7568 100644 --- a/sys/netgraph/ng_parse.c +++ b/sys/netgraph/ng_parse.c @@ -1456,13 +1456,10 @@ ng_unparse_composite(const struct ng_parse_type *type, const u_char *data, cbuf += strlen(cbuf); didOne = 1; } - FREE(workBuf, M_NETGRAPH_PARSE); /* Closing brace/bracket */ - if ((error = ng_parse_append(&cbuf, &cbuflen, "%s%c", - didOne ? " " : "", (ctype == CT_STRUCT) ? '}' : ']')) != 0) - goto fail; - return (0); + error = ng_parse_append(&cbuf, &cbuflen, "%s%c", + didOne ? " " : "", (ctype == CT_STRUCT) ? '}' : ']'); fail: /* Clean up after failure */ |