where is something wrong with the vlc interface to the variables, it is either segfaulting or getting the wrong values

var_InheritBool returns true but should return false
var_GetString is faulting

the vlc destroy is faulting on application exit

there are some memory leaks in the plugin code?
(at some places the string from var_GetString is freed and sometimes not)