Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix usage of unitialized pointer
In the error path after a getgrgid_r failure (e.g. when a unnamed gid was used), the pointer tsv->group was left unitialized. Still the tsv was given to pthread_setspecific(key_thread_stdenv_vars,...) and the consumers used and freed the uninitialized pointer. 2017-05-29T18:16:11+02:00 rofl automount[14749]: attempting to mount entry /package/twiki 2017-05-29T18:16:11+02:00 rofl automount[14749]: set_tsd_user_vars: failed to get group info from getgrgid_r 2017-05-29T18:16:11+02:00 rofl automount[14749]: mounted /package/twiki 2017-05-29T18:16:11+02:00 rofl systemd[1]: automount.service: main process exited, code=dumped, status=6 2017-05-29T18:16:12+02:00 rofl systemd[1]: automount.service holdoff time over, scheduling restart. 2017-05-29T18:16:12+02:00 rofl systemd[1]: Unit automount.service entered failed state. 2017-05-29T18:16:12+02:00 rofl automount[17936]: Starting automounter version 5.1.3, master map auto.master [May29 18:16] traps: automount[18234] general protection ip:7f8b025c324a sp:7f8b0049a508 error:0 in libc-2.19.so[7f8b02541000+1a2000] Handle the error by not calling pthread_setspecific. Clean up and return instead.
- Loading branch information