pcm: dshare - fix shared memory pointer check
A message that is not in the archive (sent off-list or not yet received): [email protected]
alsa-project/alsa-lib pull request #128 was opened from VanithaChannaiah:
Currently shared memory pointer is initialized to 0 and set to -1 in some, but not in all error paths.
In cleanup path of open the shm pointer is only compared to be non-NULL before dereferencing it which leads to SEGFAULT in case it was set to -1.
This patch initializes pointer to -1 to have a unique identification for invalid pointer and also checks for pointer being not -1 on access in cleanup path.
Request URL : https://github.com/alsa-project/alsa-lib/pull/128
Patch URL : https://github.com/alsa-project/alsa-lib/pull/128.patch
Repository URL: https://github.com/alsa-project/alsa-lib