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

[Bug] _z_trigger_queryables_inner() does not release infos for unhandled queries #879

Closed
pdematteis opened this issue Feb 3, 2025 · 1 comment · Fixed by #880
Closed
Labels
bug Something isn't working

Comments

@pdematteis
Copy link

Describe the bug

When Z_FEATURE_RX_CACHE = 0 and an unhandled query is received, the function _z_trigger_queryables_inner() in session/queryable.c drops the keyexpr, but leaks the infos vector.

I think it should be:

    ....
    if (qle_infos.qle_nb == 0) {
        _z_keyexpr_clear(&qle_infos.ke_out);
#if Z_FEATURE_RX_CACHE != 1
        _z_queryable_infos_svec_release(&qle_infos.infos);  // Otherwise it's released with cache
#endif
        return _Z_RES_OK;
    }
    ....

Is that right?
Thanks

To reproduce

.

System info

.

@pdematteis pdematteis added the bug Something isn't working label Feb 3, 2025
@jean-roland
Copy link
Contributor

That is correct, will push a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants