Skip to content
Snippets Groups Projects
Verified Commit d6742a7d authored by Khuu Minh Thang's avatar Khuu Minh Thang Committed by Laurent Voisin
Browse files

Ticket #1363: Fix memory leak in treat_one_relative_path_element_2

In the op treat_one_relative_path_element_2, clear_browse_result is
called only if compute_browse_result_from_source returns e_sc_ok.
However, compute_browse_result_from_source can allocate memory for
browse results even if the return code is not e_sc_ok. It is the case
where the return code is e_sc_bad_query_too_complex. This code can be
obtained when compute_browse_result, called by
compute_browse_result_from_source
returns e_sc_bad_no_continuation_points.

One of the solutions is to clear browse result (by calling clear_browse_result)
in compute_browse_result_from_source if comput_browse_result returns
e_sc_bad_no_continuation_points. By this solution, the browse results
are only allocated and computed iff the return code is e_sc_ok.
parent 713c3980
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment