Fix oss_init() error path.
authorAndre Noll <maan@systemlinux.org>
Sun, 20 Feb 2011 18:56:59 +0000 (19:56 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 20 Feb 2011 19:27:25 +0000 (20:27 +0100)
commit9a0dd8271e92a2e3bbd330c2a7e2fc05c7f3bde9
tree4b777df1d35e335ff2ff90a0026fdf676d720c7f
parent0267a3f3f13e16bc92b890e1d5bd49c5bd5c58e3
Fix oss_init() error path.

A bug similar to the one fixed in the previous patch for the alsa
writer is also present in the oss writer: If oss_init() fails the
->private_data pointer is non-NULL, but its contents have already
been freed. glibc detects this, aborts the process and spits out

*** glibc detected *** ./para_write: double free or corruption (fasttop): 0x080622a0 ***

Fix this bug by initializing ->private_data only if oss_init()
succeeds.
oss_write.c