http://bugzilla.novell.com/show_bug.cgi?id=597772 http://bugzilla.novell.com/show_bug.cgi?id=597772#c3 Michael Andres <ma@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ma@novell.com Component|libzypp |GNOME AssignedTo|zypp-maintainers@forge.prov |sreeves@novell.com |o.novell.com | --- Comment #3 from Michael Andres <ma@novell.com> 2010-04-21 16:24:50 UTC --- Having a glimpse at the backend code, I see some switch in pk-backend-zypp.cpp(backend_find_packages_thread) that calls zypp_get_packages_by_name, _by_details or _by_file (in zypp-utils.cpp) to perform the search. zypp_get_packages_by_name uses exact matching, probably because it's used from other locations too. I also see a memory leak in backend_find_packages_thread. Don't know whether it's actually necessary to use dynamically allocated 'std::vector', but the pointer should not be initialized with 'new std::vector' if later the query result is simply assigned. I don't know why this is not implemented using a plain std::vector. Other methods like zypp_get_patches also return pointer to allocated memory, but not all calling locations save the pointer and take care about calling delete. If all those really need to be created dynamically, it cries for a RAII solution. @Scott: I attach 2 (untested) patches. One for the memory leak and my suggestion how to fix backend_find_packages using a PoolQuery. The comments suggested that you'd like to support multiple search strings (OR'ed). PoolQuery would be able to do this. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.