- if (source->fd_type == FD_TYPE_FENCE && source->type == SOURCE_TYPE_DISPOSABLE)
then g_source_remove_unix_fd, g_source_destroy, g_source_unref is called twice for source->gsource.
- it can cause error like that free already freed memory or free with invalid pointer (garbage value)
Change-Id: I44e3b1d50b0710d9cd2ddcf8e8c8f4215acff344
g_source_destroy(&source->gsource);
g_source_unref(&source->gsource);
}
- __gsource_remove_and_destroy(source);
+ else
+ __gsource_remove_and_destroy(source);
}
g_mutex_unlock(&thread->thread_mutex);