Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
audio/pulseaudio: new patch, revbump.
The new patch fixes a startup failure due to improper memory handling. Another patch has been reworked to bypass potential problems later on.
- Loading branch information
Showing
3 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...seaudio/files/patch-src_modules_macosx_module_coreaudio_device.c-fix-memory-handling.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- src/modules/macosx/module-coreaudio-device.c.old 2017-02-12 05:50:46.000000000 +0100 | ||
+++ src/modules/macosx/module-coreaudio-device.c 2017-02-12 05:52:54.000000000 +0100 | ||
@@ -384,8 +384,6 @@ static int ca_sink_set_state(pa_sink *s, | ||
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 */; | ||
@@ -415,7 +413,7 @@ static int ca_device_create_sink(pa_modu | ||
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; | ||
@@ -455,6 +453,7 @@ static int ca_device_create_sink(pa_modu | ||
pa_strbuf_puts(strbuf, tmp); | ||
|
||
pa_xfree(tmp); | ||
+ tmp = NULL; | ||
} | ||
|
||
/* Clamp to PA_NAME_MAX and leave a "safety margin" for deduplication | ||
@@ -552,7 +551,7 @@ static int ca_device_create_source(pa_mo | ||
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; | ||
@@ -592,6 +591,7 @@ static int ca_device_create_source(pa_mo | ||
pa_strbuf_puts(strbuf, tmp); | ||
|
||
pa_xfree(tmp); | ||
+ tmp = NULL; | ||
} | ||
|
||
/* Clamp to PA_NAME_MAX and leave a "safety margin" for deduplication |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters