at work
This commit is contained in:
@@ -174,5 +174,12 @@ int cfparser_parse(cfparser_t * parser) {
|
||||
|
||||
|
||||
void cfparser_destroy(cfparser_t * parser) {
|
||||
free(parser->kvalarr);
|
||||
if (parser == NULL) return;
|
||||
if (parser->kvalarr != NULL) {
|
||||
for (int i = 0; i < parser->kvalsize; i++) {
|
||||
free(parser->kvalarr[i].key);
|
||||
free(parser->kvalarr[i].val);
|
||||
}
|
||||
free(parser->kvalarr);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user