Skip to content

Fix NULL pointer dereference error for NULL mutexattr#1410

Merged
sim642 merged 2 commits intomasterfrom
mutex-init-null-attr
Apr 15, 2024
Merged

Fix NULL pointer dereference error for NULL mutexattr#1410
sim642 merged 2 commits intomasterfrom
mutex-init-null-attr

Conversation

@sim642
Copy link
Copy Markdown
Member

@sim642 sim642 commented Apr 5, 2024

Previously

pthread_mutex_init(&mut, NULL);

resulted in a must dereference NULL pointer error because the pointer was always dereferenced.

However, NULL is valid for default attributes, so this avoids the spurious error.

@sim642 sim642 added this to the v2.4.0 milestone Apr 15, 2024
@sim642 sim642 merged commit bc9f254 into master Apr 15, 2024
@sim642 sim642 deleted the mutex-init-null-attr branch April 15, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants