Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ffmemless: Dont destroy empty table #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

neochapay
Copy link

Related #3

if plguin cat load plugin in ffm_setup_effects we destroy table and destroy it second time in ffm_sink_shutdown()

Copy link
Contributor

@pvuorela pvuorela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me this looks suspicious, though already currently too. Now if the hash table is destroyed in two places, the latter one would be using a dangling pointer if the instance got deleted already? Assigning null after deleted would protect that, but not sure here why the error case even does the destroy.

cc @jusa

@monich
Copy link
Member

monich commented Mar 27, 2023

void
g_hash_table_destroy (GHashTable *hash_table)
{
  g_hash_table_remove_all (hash_table);
  g_hash_table_unref (hash_table);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants