I found this code in the Open Source code for Wireshark, and it appears it is returning a local variable, which I thought was not allowed, since the variable goes out of scope once the routine returns.
However, since it's a static routine, maybe that makes it OK,
Is it OK to return a local variable from a static function?
static GSList* local_interfaces_to_list_win(void)
GSList *interfaces = NULL;
(This is C code.)