goblint / analyzer

Static analysis framework for C
https://goblint.in.tum.de
MIT License
160 stars 72 forks source link

Fix NULL pointer dereference error for NULL mutexattr #1410

Closed sim642 closed 2 months ago

sim642 commented 3 months ago

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.