Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate possible memory leak in buffered_file_stream_alloc #6

Open
noproto opened this issue Apr 25, 2023 · 1 comment
Open

Investigate possible memory leak in buffered_file_stream_alloc #6

noproto opened this issue Apr 25, 2023 · 1 comment

Comments

@noproto
Copy link
Owner

noproto commented Apr 25, 2023

    furi_delay_ms(5000); // run log
    Storage* storage = furi_record_open(RECORD_STORAGE);

    for(uint32_t i = 0; i < 1024; i++) {
        Stream* file_stream = buffered_file_stream_alloc(storage);
        buffered_file_stream_close(file_stream);
        free(file_stream);
        FURI_LOG_E("Bench", "Running %lu, still fine...", i); // will crash after ~100 runs
    }

    furi_record_close(RECORD_STORAGE);
@noproto
Copy link
Owner Author

noproto commented Aug 14, 2023

Possibly missing stream_free instead of regular free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant