[pulseaudio-commits] 2 commits - src/Makefile.am src/modules

Tanu Kaskinen tanuk at kemper.freedesktop.org
Mon Feb 27 14:48:21 UTC 2017


 src/Makefile.am                              |    2 --
 src/modules/macosx/module-coreaudio-device.c |    8 ++++----
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit c7d8085acb8c74d78ae9ebfcd0c4eaba8e2e113c
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Feb 25 10:38:24 2017 +0100

    coreaudio-device: fix improper memory handling leading to crashes.
    
    Make sure that we NULL pointers after freeing them. Otherwise bad things
    happen.

diff --git a/src/modules/macosx/module-coreaudio-device.c b/src/modules/macosx/module-coreaudio-device.c
index 502fc51..503b80e 100644
--- a/src/modules/macosx/module-coreaudio-device.c
+++ b/src/modules/macosx/module-coreaudio-device.c
@@ -379,8 +379,6 @@ static int ca_sink_set_state(pa_sink *s, pa_sink_state_t state) {
 static char * CFString_to_cstr(CFStringRef cfstr) {
     char *ret = NULL;
 
-    ret = false;
-
     if (cfstr != NULL) {
         const char *tmp = CFStringGetCStringPtr(cfstr, kCFStringEncodingUTF8);
         CFIndex n = CFStringGetLength(cfstr) + 1 /* for the terminating NULL */;
@@ -410,7 +408,7 @@ static int ca_device_create_sink(pa_module *m, AudioBuffer *buf, int channel_idx
     coreaudio_sink *ca_sink;
     pa_sink *sink;
     unsigned int i;
-    char *tmp;
+    char *tmp = NULL;
     pa_strbuf *strbuf;
     AudioObjectPropertyAddress property_address;
     CFStringRef tmp_cfstr = NULL;
@@ -450,6 +448,7 @@ static int ca_device_create_sink(pa_module *m, AudioBuffer *buf, int channel_idx
             pa_strbuf_puts(strbuf, tmp);
 
         pa_xfree(tmp);
+        tmp = NULL;
     }
 
     ca_sink->name = pa_strbuf_to_string_free(strbuf);
@@ -543,7 +542,7 @@ static int ca_device_create_source(pa_module *m, AudioBuffer *buf, int channel_i
     coreaudio_source *ca_source;
     pa_source *source;
     unsigned int i;
-    char *tmp;
+    char *tmp = NULL;
     pa_strbuf *strbuf;
     AudioObjectPropertyAddress property_address;
     CFStringRef tmp_cfstr = NULL;
@@ -583,6 +582,7 @@ static int ca_device_create_source(pa_module *m, AudioBuffer *buf, int channel_i
             pa_strbuf_puts(strbuf, tmp);
 
         pa_xfree(tmp);
+        tmp = NULL;
     }
 
     ca_source->name = pa_strbuf_to_string_free(strbuf);

commit b282f3bb9668bc859e880f615c78a1fe305fc035
Author: Mihai Moldovan <ionic at ionic.de>
Date:   Sat Feb 25 10:35:06 2017 +0100

    build-sys: FlatCarbon is dead. Good riddance.
    
    FlatCarbon was the flattened Carbon version used in Mac OS Classic
    (i.e., pre Mac OS X.)
    
    It was shipped as legacy software until 10.8, then dropped completely.
    
    Using CoreServices is good enough, manually including FlatCarbon headers
    only lead to build failures for users who had old versions of Xcode
    lingering around their machines.
    
    v2: don't accidentally drop the OS X semaphore implementation.

diff --git a/src/Makefile.am b/src/Makefile.am
index 5b723e6..3ff1139 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -785,8 +785,6 @@ libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES += \
 		pulsecore/mutex-posix.c pulsecore/mutex.h \
 		pulsecore/thread-posix.c pulsecore/thread.h \
 		pulsecore/semaphore-osx.c pulsecore/semaphore.h
-libpulsecommon_ at PA_MAJORMINOR@_la_CFLAGS += "-I/Developer/Headers/FlatCarbon/"
-#libpulsecommon_ at PA_MAJORMINOR@_la_LDFLAGS += "-framework CoreServices"
 else !OS_IS_DARWIN
 libpulsecommon_ at PA_MAJORMINOR@_la_SOURCES += \
 		pulsecore/mutex-posix.c pulsecore/mutex.h \



More information about the pulseaudio-commits mailing list