Fix memory leak in asn1_array2tree()
There is another memory leak, a reproducer has been added in branch tmp-memleak-a
(use ./configure --enable-valgrind-tests
:
==25685== 152 bytes in 1 blocks are definitely lost in loss record 1 of 1
==25685== at 0x4837B65: calloc (vg_replace_malloc.c:762)
==25685== by 0x4851C0D: _asn1_add_static_node (parser_aux.c:71)
==25685== by 0x4853AAC: asn1_array2tree (structure.c:200)
==25685== by 0x10923B: main (reproducers.c:76)
The asn1_static_node
is
const asn1_static_node tab[] = {
{ "a", CONST_DOWN, "" },
{ "b", 0, "" },
{ "c", 0, "" },
{ NULL, 0, NULL }
};