>>> CID 374363: Memory - illegal accesses (USE_AFTER_FREE)
>>> Dereferencing freed pointer "t".
764 snprintf(parser->errmsg, ERRMSG_LEN,
765 _("error: unsupported column data type: %d, column: %s"),
766 jtype, t->val.str);
856 default:
857 warnx("unexpected token type: %d", t->type);
>>> CID 374360: Resource leaks (RESOURCE_LEAK)
>>> Variable "t" going out of scope leaks the storage it points to.
858 return NULL;
Signed-off-by: Karel Zak <kzak@redhat.com>
scols_column_set_flags(cl, SCOLS_FL_HIDDEN);
}
parameter_init(parser->parameters + col_id, cl);
- token_free(t);
int jtype = scols_column_get_json_type(cl);
int ntype;
return NULL;
}
node = node_val_new(ntype, col_id);
+ token_free(t);
return node;
}
case TOKEN_OP1: {
struct node *op1_right = dparser_compile1(parser, NULL);
struct op1_class *op1_class = TOKEN_OP1_CLASS(t);
+
token_free(t);
if (GOT_ERROR(parser)) {
case TOKEN_OP2: {
struct node *op2_right = dparser_compile1(parser, NULL);
struct op2_class *op2_class = TOKEN_OP2_CLASS(t);
+
token_free(t);
if (GOT_ERROR(parser)) {
default:
warnx("unexpected token type: %d", t->type);
+ token_free(t);
return NULL;
}
}