In the function ts3plugin_infoData the provided code documentation states to set the parameter "data" to NULL under a special case. However, setting "data" to NULL is valid only in the local function scope. Do you mean to say set "*data" to NULL? As one of the line mallocs *data as a string buffer.