You provided an incorrect value to unregister your callback function. Pass a null value, not a function pointer, to the callback function.