[PATCH 1/5] module-coreaudio-detect: fix pa__done()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Daniel Mack <daniel@xxxxxxxx>

This would have crashed when unloading the module.
---
 src/modules/coreaudio/module-coreaudio-detect.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/modules/coreaudio/module-coreaudio-detect.c b/src/modules/coreaudio/module-coreaudio-detect.c
index 1d26b84..fda1f17 100644
--- a/src/modules/coreaudio/module-coreaudio-detect.c
+++ b/src/modules/coreaudio/module-coreaudio-detect.c
@@ -231,13 +231,10 @@ fail:
 }
 
 void pa__done(pa_module *m) {
-    struct userdata *u;
+    struct userdata *u = m->userdata;
     struct ca_device *dev = u->devices;
     AudioObjectPropertyAddress property_address;
 
-    pa_assert(m);
-    pa_assert_se(u = m->userdata);
-
     property_address.mSelector = kAudioHardwarePropertyDevices;
     property_address.mScope = kAudioObjectPropertyScopeGlobal;
     property_address.mElement = kAudioObjectPropertyElementMaster;
-- 
1.7.1




[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux