]> git.ipfire.org Git - thirdparty/glibc.git/commit
Fix use of __pthread_attr_copy in mq_notify (bug 27896)
authorFlorian Weimer <fweimer@redhat.com>
Tue, 1 Jun 2021 15:51:41 +0000 (17:51 +0200)
committerArjun Shankar <arjun@redhat.com>
Thu, 10 Jun 2021 09:46:59 +0000 (11:46 +0200)
commit8c06748c51750333d1516a2d342ed2361186e908
treec8d2fcfa16848e300bc3dddc9bfccf79e751e8cf
parent4b6be914bd3920500a67ef6ca1aa7d1c37e5e859
Fix use of __pthread_attr_copy in mq_notify (bug 27896)

__pthread_attr_copy can fail and does not initialize the attribute
structure in that case.

If __pthread_attr_copy is never called and there is no allocated
attribute, pthread_attr_destroy should not be called, otherwise
there is a null pointer dereference in rt/tst-mqueue6.

Fixes commit 42d359350510506b87101cf77202fefcbfc790cb
("Use __pthread_attr_copy in mq_notify (bug 27896)").

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit 217b6dc298156bdb0d6aea9ea93e7e394a5ff091)
sysdeps/unix/sysv/linux/mq_notify.c