The list is internal to GIRepository and should not be freed, nor should its string elements.
To check this, simply call (gir:repository-get-search-path) two times. The second one will fail because the pointer was freed.
The issue is that g-slist-to-list always calls (g-slist-free pointer) at the end. So a quick solution would be to add a param to g-slist-to-list that determines if the original list should be freed or not.
From the docs
To check this, simply call
(gir:repository-get-search-path)
two times. The second one will fail because the pointer was freed. The issue is thatg-slist-to-list
always calls(g-slist-free pointer)
at the end. So a quick solution would be to add a param tog-slist-to-list
that determines if the original list should be freed or not.