Plug a memory leak found by clang's static analyzer

charset.c:360:2: warning: Potential leak of memory pointed to by 'c'
        return NULL;
        ^~~~~~~~~~~
1 warning generated.
Signed-off-by: Jeremy Huddleston Sequoia's avatarJeremy Huddleston Sequoia <jeremyhu@apple.com>
parent dc5882d8
......@@ -356,7 +356,7 @@ getOtherCharset(const char *name)
c->other_aux = s;
if (!fc->init(s)) {
c->type = T_FAILED;
free(c);
return NULL;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment