Commit ed99b324 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Free struct vjsn

parent f20ac342
......@@ -90,7 +90,7 @@ vjsn_val_delete(struct vjsn_val *jsv)
FREE_OBJ(jsv);
}
static void
void
vjsn_delete(struct vjsn **jp)
{
struct vjsn *js;
......
......@@ -55,5 +55,6 @@ struct vjsn {
};
struct vjsn *vjsn_parse(const char *, const char **);
void vjsn_delete(struct vjsn **);
void vjsn_dump(const struct vjsn *js, FILE *fo);
struct vjsn_val *vjsn_child(const struct vjsn_val *, const char *);
......@@ -315,11 +315,7 @@ vsc_iter_fantom(struct vsm *vd, const struct vsm_fantom *fantom,
p = (char*)fantom->b + 8 + vbe64dec(fantom->b);
assert (p < (char*)fantom->e);
vj = vjsn_parse(p, &e);
if (e != NULL) {
fprintf(stderr, "%s\n", p);
fprintf(stderr, "JSON ERROR %s\n", e);
exit(2);
}
XXXAZ(e);
AN(vj);
vve = vjsn_child(vj->value, "elem");
AN(vve);
......@@ -328,7 +324,7 @@ vsc_iter_fantom(struct vsm *vd, const struct vsm_fantom *fantom,
if (i)
break;
}
// XXX: destroy vj
vjsn_delete(&vj);
return (i);
}
......
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