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

Fix memory leak in fts_flatcurve_xapian_query_iter_next() #70

Conversation

edieterich
Copy link
Contributor

This patch fixes a memory leak in fts_flatcurve_xapian_query_iter_next().

valgrind:

==29989== 39,883 (256 direct, 39,627 indirect) bytes in 1 blocks are definitely lost in loss record 42 of 43
==29989==    at 0x4840F2F: operator new(unsigned long) (vg_replace_malloc.c:422)
==29989==    by 0x7E8B2B0: ??? (in /usr/lib/x86_64-linux-gnu/libxapian.so.30.12.3)
==29989==    by 0x7D930FD: Xapian::Enquire::Internal::get_mset(unsigned int, unsigned int, unsigned int, Xapian::RSet const*, Xapian::MatchDecider const*) const (in /usr/lib/x86_64-linux-gnu/libxapian.so.30.12.3)
==29989==    by 0x7D93363: Xapian::Enquire::get_mset(unsigned int, unsigned int, unsigned int, Xapian::RSet const*, Xapian::MatchDecider const*) const (in /usr/lib/x86_64-linux-gnu/libxapian.so.30.12.3)
==29989==    by 0x55940C4: fts_flatcurve_xapian_query_iter_next (fts-backend-flatcurve-xapian.cpp:1752)
==29989==    by 0x559457A: fts_flatcurve_xapian_run_query (fts-backend-flatcurve-xapian.cpp:1811)
==29989==    by 0x558DB9B: fts_backend_flatcurve_lookup_multi (fts-backend-flatcurve.c:593)
==29989==    by 0x558DEFA: fts_backend_flatcurve_lookup (fts-backend-flatcurve.c:652)
==29989==    by 0x536B35C: fts_backend_lookup (fts-api.c:377)
==29989==    by 0x5370156: fts_search_lookup_level_single (fts-search.c:53)
==29989==    by 0x5370156: fts_search_lookup_level (fts-search.c:216)
==29989==    by 0x53708EB: fts_search_try_lookup (fts-search.c:371)
==29989==    by 0x53708EB: fts_search_lookup (fts-search.c:383)
==29989==    by 0x53734CF: fts_mailbox_search_init (fts-storage.c:264)

@slusarz slusarz merged commit bb377db into slusarz:master Sep 25, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants