ada icon indicating copy to clipboard operation
ada copied to clipboard

Improved Memory Management Proper Resource Cleanup and Freeing Allocated Memory

Open Shivam7-1 opened this issue 11 months ago • 2 comments

This PR improves memory management by ensuring all dynamically allocated resources are properly freed. It adds early exits with cleanup for invalid parsing and URL checks, ensures out and out_get_origin are freed in all exit paths, and prevents memory leaks, enhancing the robustness and efficiency of the fuzzer code.

Shivam7-1 avatar Dec 20 '24 11:12 Shivam7-1

Hii @anonrig Could you please Review This PR whenever you are free :) Thanks

Shivam7-1 avatar Dec 20 '24 18:12 Shivam7-1

Hii @anonrig I had done some changes above that the fuzzer continues even if ada_parse fails or the URL is invalid, improving test coverage. Instead of returning immediately, memory is properly managed by freeing allocated resources, but the fuzzer still proceeds to test ada_can_parse and other functions. This avoids prematurely ending tests while ensuring correct memory cleanup for invalid inputs.

Shivam7-1 avatar Dec 21 '24 03:12 Shivam7-1