loopback: Fix crash bug 77/259377/5 accepted/tizen/unified/20210624.131839 submit/tizen/20210623.034843
authorGeorg Chini <georg@chini.tk>
Mon, 19 Apr 2021 06:19:50 +0000 (08:19 +0200)
committerJaechul Lee <jcsing.lee@samsung.com>
Mon, 7 Jun 2021 04:55:29 +0000 (13:55 +0900)
commitdb223af39eef1a72f0ed02d641088329b6d77c52
tree4390c3c395f4f8d5e3ee02bf399ff96ff58089cf
parente92627ac7bafee31ab70d38c1248e784752cf77d
loopback: Fix crash bug

The loopback message may be called after the sink input is already destroyed which causes
a crash. Also memory is leaked because the message object is not correctly freed.

This patch fixes the problems by adding a "dead" flag to the message structure and freeing
the message object on exit.

[jcsing.lee: backport mainline commit 468e3669a for fixing crash]

[Version] 13.0-31
[Issue Type] Bug fix

Change-Id: Id5ce55554fadda9cffeca698685897a88f45c2cb
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/541>
packaging/pulseaudio.spec
src/modules/module-loopback.c