cJSON icon indicating copy to clipboard operation
cJSON copied to clipboard

resource leak found by cppcheck

Open Zhangjc20 opened this issue 7 months ago • 0 comments

Image in the aboved picture, it seems that in "fuzzing/fuzz_main.c" ,its better to add a block "if (f) fclose(f)" before return 0, or there may be resource leaks when fuzzing a large number of files. Image in the second picture, it seems that in "tests/unity/extras/fixture/src/unity_fixture.c" ,its better to free mem or guard before return.

Please tell me if there is anything wrong with my idea.

Zhangjc20 avatar Jun 04 '25 13:06 Zhangjc20