==166211== Invalid read of size 8
==166211==    at 0x48A60E6: ??? (in /opt/firebird/lib/libfbembed.so.2.0.7)
==166211==    by 0x489D147: isc_dsql_free_statement (in /opt/firebird/lib/libfbembed.so.2.0.7)
==166211==    by 0x401B3A: select_json (dsql.c:117)
==166211==    by 0x4015E4: read_data (reader.c:29)
==166211==    by 0x401430: main (index.c:18)
==166211==  Address 0x1ffefbffa0 is on thread 1's stack
==166211==  272 bytes below stack pointer

예? 어디를 읽는다고요?


==166211== HEAP SUMMARY:
==166211==     in use at exit: 1,406 bytes in 4 blocks
==166211==   total heap usage: 12,474 allocs, 12,470 frees, 4,479,506 bytes allocated

4블록 어디감?


==166211== 26 bytes in 1 blocks are still reachable in loss record 1 of 4
==166211==    at 0x483877F: malloc (vg_replace_malloc.c:307)
==166211==    by 0x401C26A: strdup (strdup.c:42)
==166211==    by 0x40091FB: _dl_map_object (dl-load.c:2168)
==166211==    by 0x4013D41: dl_open_worker (dl-open.c:513)
==166211==    by 0x4D08A8F: _dl_catch_exception (dl-error-skeleton.c:208)
==166211==    by 0x40138F9: _dl_open (dl-open.c:837)
==166211==    by 0x4DA8257: dlopen_doit (dlopen.c:66)
==166211==    by 0x4D08A8F: _dl_catch_exception (dl-error-skeleton.c:208)
==166211==    by 0x4D08B4E: _dl_catch_error (dl-error-skeleton.c:227)
==166211==    by 0x4DA8A64: _dlerror_run (dlerror.c:170)
==166211==    by 0x4DA82E3: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==166211==    by 0x4880C79: ??? (in /opt/firebird/lib/libfbembed.so.2.0.7)
==166211==
==166211== 26 bytes in 1 blocks are still reachable in loss record 2 of 4
==166211==    at 0x483877F: malloc (vg_replace_malloc.c:307)
==166211==    by 0x400BFB7: _dl_new_object (dl-object.c:196)
==166211==    by 0x4007255: _dl_map_object_from_fd (dl-load.c:997)
==166211==    by 0x4009274: _dl_map_object (dl-load.c:2236)
==166211==    by 0x4013D41: dl_open_worker (dl-open.c:513)
==166211==    by 0x4D08A8F: _dl_catch_exception (dl-error-skeleton.c:208)
==166211==    by 0x40138F9: _dl_open (dl-open.c:837)
==166211==    by 0x4DA8257: dlopen_doit (dlopen.c:66)
==166211==    by 0x4D08A8F: _dl_catch_exception (dl-error-skeleton.c:208)
==166211==    by 0x4D08B4E: _dl_catch_error (dl-error-skeleton.c:227)
==166211==    by 0x4DA8A64: _dlerror_run (dlerror.c:170)
==166211==    by 0x4DA82E3: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==166211==
==166211== 144 bytes in 1 blocks are still reachable in loss record 3 of 4
==166211==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==166211==    by 0x40116B6: _dl_check_map_versions (dl-version.c:274)
==166211==    by 0x4013DF5: dl_open_worker (dl-open.c:577)
==166211==    by 0x4D08A8F: _dl_catch_exception (dl-error-skeleton.c:208)
==166211==    by 0x40138F9: _dl_open (dl-open.c:837)
==166211==    by 0x4DA8257: dlopen_doit (dlopen.c:66)
==166211==    by 0x4D08A8F: _dl_catch_exception (dl-error-skeleton.c:208)
==166211==    by 0x4D08B4E: _dl_catch_error (dl-error-skeleton.c:227)
==166211==    by 0x4DA8A64: _dlerror_run (dlerror.c:170)
==166211==    by 0x4DA82E3: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==166211==    by 0x4880C79: ??? (in /opt/firebird/lib/libfbembed.so.2.0.7)
==166211==    by 0x4942093: ??? (in /opt/firebird/lib/libfbembed.so.2.0.7)
==166211==
==166211== 1,210 bytes in 1 blocks are still reachable in loss record 4 of 4
==166211==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==166211==    by 0x400BCDF: _dl_new_object (dl-object.c:89)
==166211==    by 0x4007255: _dl_map_object_from_fd (dl-load.c:997)
==166211==    by 0x4009274: _dl_map_object (dl-load.c:2236)
==166211==    by 0x4013D41: dl_open_worker (dl-open.c:513)
==166211==    by 0x4D08A8F: _dl_catch_exception (dl-error-skeleton.c:208)
==166211==    by 0x40138F9: _dl_open (dl-open.c:837)
==166211==    by 0x4DA8257: dlopen_doit (dlopen.c:66)
==166211==    by 0x4D08A8F: _dl_catch_exception (dl-error-skeleton.c:208)
==166211==    by 0x4D08B4E: _dl_catch_error (dl-error-skeleton.c:227)
==166211==    by 0x4DA8A64: _dlerror_run (dlerror.c:170)
==166211==    by 0x4DA82E3: dlopen@@GLIBC_2.2.5 (dlopen.c:87)
==166211==
==166211== LEAK SUMMARY:
==166211==    definitely lost: 0 bytes in 0 blocks
==166211==    indirectly lost: 0 bytes in 0 blocks
==166211==      possibly lost: 0 bytes in 0 blocks
==166211==    still reachable: 1,406 bytes in 4 blocks
==166211==         suppressed: 0 bytes in 0 blocks

왜 free 안함?