[pulseaudio-commits] [SCM] PulseAudio Sound Server branch, master, updated. v0.9.16-test6-30-g300384c

Lennart Poettering gitmailer-noreply at 0pointer.de
Fri Aug 28 08:15:02 PDT 2009


This is an automated email from the git hooks/post-receive script. It was
generated because of a push to the "PulseAudio Sound Server" repository.

The master branch has been updated
      from  db835deb9814e26b2999f66bdd455a1fd4ff0044 (commit)

- Log -----------------------------------------------------------------
300384c Fix checking for NULL after usage
ae38353 core-util: Fix logic of pa_make_path_absolute()
4e8562c raop: Fix memory leak
9011c4e build-sys: make proximity helper properly suid
63f3dc0 bluetooth: remove left-over debug line
-----------------------------------------------------------------------

Summary of changes:
 src/Makefile.am                                   |    2 +-
 src/modules/bluetooth/module-bluetooth-discover.c |    1 -
 src/modules/rtp/rtsp_client.c                     |   10 +++++++---
 src/pulse/ext-stream-restore.c                    |   18 ++++++------------
 src/pulsecore/core-util.c                         |   12 ++++++------
 src/pulsecore/protocol-simple.c                   |    3 +--
 src/pulsecore/resampler.c                         |    3 +--
 src/pulsecore/sound-file-stream.c                 |    3 +--
 8 files changed, 23 insertions(+), 29 deletions(-)

-----------------------------------------------------------------------

commit 63f3dc0bdc789fa26a7a6e05f0127411c74ff143
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Aug 28 17:07:08 2009 +0200

    bluetooth: remove left-over debug line

diff --git a/src/modules/bluetooth/module-bluetooth-discover.c b/src/modules/bluetooth/module-bluetooth-discover.c
index 7571e48..02fd424 100644
--- a/src/modules/bluetooth/module-bluetooth-discover.c
+++ b/src/modules/bluetooth/module-bluetooth-discover.c
@@ -83,7 +83,6 @@ static pa_hook_result_t load_module_for_device(pa_bluetooth_discovery *y, const
 
     mi = pa_hashmap_get(u->hashmap, d->path);
 
-    pa_log("dead: %d, device_connected: %d, audio_state: %d, audio_source_state: %d", d->dead, d->device_connected, d->audio_state, d->audio_source_state);
     if (!d->dead &&
         d->device_connected > 0 && (d->audio_state >= PA_BT_AUDIO_STATE_CONNECTED || d->audio_source_state >= PA_BT_AUDIO_STATE_CONNECTED)) {
 

commit 9011c4e4f771575fc5bf68d3afcb6d0f5c856384
Author: Lennart Poettering <lennart at poettering.net>
Date:   Fri Aug 28 17:10:17 2009 +0200

    build-sys: make proximity helper properly suid

diff --git a/src/Makefile.am b/src/Makefile.am
index 654dc41..88f0ff5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1738,7 +1738,7 @@ daemon.conf: daemon/daemon.conf.in Makefile
 		-e 's, at PA_DEFAULT_CONFIG_FILE\@,$(DEFAULT_CONFIG_DIR),g' < $< > $@
 
 install-exec-hook:
-	chown root $(DESTDIR)$(bindir)/pulseaudio ; true
+	-chown root $(DESTDIR)$(pulselibexecdir)/proximity-helper
 	-chmod u+s $(DESTDIR)$(pulselibexecdir)/proximity-helper
 	ln -sf pacat $(DESTDIR)$(bindir)/parec
 	ln -sf pacat $(DESTDIR)$(bindir)/pamon

commit 4e8562c1f1cf5ee134043747feea093ded469be4
Author: Andy Shevchenko <ext-andriy.shevchenko at nokia.com>
Date:   Fri Aug 28 15:16:52 2009 +0300

    raop: Fix memory leak
    
    The return memory of the pa_strbuf_tostring_free() should be freed.
    pa_headerlist_puts() saves its own copy.

diff --git a/src/modules/rtp/rtsp_client.c b/src/modules/rtp/rtsp_client.c
index 72d304e..ba657f7 100644
--- a/src/modules/rtp/rtsp_client.c
+++ b/src/modules/rtp/rtsp_client.c
@@ -214,11 +214,13 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
         /* End of headers */
         /* We will have a header left from our looping iteration, so add it in :) */
         if (c->last_header) {
+            char *tmp = pa_strbuf_tostring_free(c->header_buffer);
             /* This is not a continuation header so let's dump it into our proplist */
-            pa_headerlist_puts(c->response_headers, c->last_header, pa_strbuf_tostring_free(c->header_buffer));
+            pa_headerlist_puts(c->response_headers, c->last_header, tmp);
+            pa_xfree(tmp);
             pa_xfree(c->last_header);
             c->last_header = NULL;
-            c->header_buffer= NULL;
+            c->header_buffer = NULL;
         }
 
         pa_log_debug("Full response received. Dispatching");
@@ -240,9 +242,11 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) {
     }
 
     if (c->last_header) {
+        char *tmp = pa_strbuf_tostring_free(c->header_buffer);
         /* This is not a continuation header so let's dump the full
           header/value into our proplist */
-        pa_headerlist_puts(c->response_headers, c->last_header, pa_strbuf_tostring_free(c->header_buffer));
+        pa_headerlist_puts(c->response_headers, c->last_header, tmp);
+        pa_xfree(tmp);
         pa_xfree(c->last_header);
         c->last_header = NULL;
         c->header_buffer = NULL;

commit ae383539d7001d59044e6d7e06e9270b65ae762b
Author: Andy Shevchenko <ext-andriy.shevchenko at nokia.com>
Date:   Fri Aug 28 15:16:53 2009 +0300

    core-util: Fix logic of pa_make_path_absolute()
    
    Make it works as described in commentary (when fn is NULL, pa_assert(fn) could
    break logic).

diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 1c8c678..6782301 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -1877,17 +1877,17 @@ char *pa_make_path_absolute(const char *p) {
 static char *get_path(const char *fn, pa_bool_t prependmid, pa_bool_t rt) {
     char *rtp;
 
-    if (pa_is_path_absolute(fn))
-        return pa_xstrdup(fn);
-
     rtp = rt ? pa_get_runtime_dir() : pa_get_state_dir();
 
-    if (!rtp)
-        return NULL;
-
     if (fn) {
         char *r;
 
+        if (pa_is_path_absolute(fn))
+            return pa_xstrdup(fn);
+
+        if (!rtp)
+            return NULL;
+
         if (prependmid) {
             char *mid;
 

commit 300384ce0aa79bd86cdafa88848c6e944c0353b5
Author: Andy Shevchenko <ext-andriy.shevchenko at nokia.com>
Date:   Fri Aug 28 15:16:54 2009 +0300

    Fix checking for NULL after usage
    
    The pa_xmalloc calls oom() in case of NULL pointer returned by malloc() on one
    hand and dereferencing of pointer is happen early than actual check on other
    hand. Thus, just remove useless checks.

diff --git a/src/pulse/ext-stream-restore.c b/src/pulse/ext-stream-restore.c
index 63c911f..10e9fd5 100644
--- a/src/pulse/ext-stream-restore.c
+++ b/src/pulse/ext-stream-restore.c
@@ -239,13 +239,10 @@ pa_operation *pa_ext_stream_restore_write(
     return o;
 
 fail:
-    if (o) {
-        pa_operation_cancel(o);
-        pa_operation_unref(o);
-    }
+    pa_operation_cancel(o);
+    pa_operation_unref(o);
 
-    if (t)
-        pa_tagstruct_free(t);
+    pa_tagstruct_free(t);
 
     pa_context_set_error(c, PA_ERR_INVALID);
     return NULL;
@@ -290,13 +287,10 @@ pa_operation *pa_ext_stream_restore_delete(
     return o;
 
 fail:
-    if (o) {
-        pa_operation_cancel(o);
-        pa_operation_unref(o);
-    }
+    pa_operation_cancel(o);
+    pa_operation_unref(o);
 
-    if (t)
-        pa_tagstruct_free(t);
+    pa_tagstruct_free(t);
 
     pa_context_set_error(c, PA_ERR_INVALID);
     return NULL;
diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c
index 95ec6ac..488d757 100644
--- a/src/pulsecore/protocol-simple.c
+++ b/src/pulsecore/protocol-simple.c
@@ -627,8 +627,7 @@ void pa_simple_protocol_connect(pa_simple_protocol *p, pa_iochannel *io, pa_simp
     return;
 
 fail:
-    if (c)
-        connection_unlink(c);
+    connection_unlink(c);
 }
 
 void pa_simple_protocol_disconnect(pa_simple_protocol *p, pa_module *m) {
diff --git a/src/pulsecore/resampler.c b/src/pulsecore/resampler.c
index f1bfa15..bed5a20 100644
--- a/src/pulsecore/resampler.c
+++ b/src/pulsecore/resampler.c
@@ -299,8 +299,7 @@ pa_resampler* pa_resampler_new(
     return r;
 
 fail:
-    if (r)
-        pa_xfree(r);
+    pa_xfree(r);
 
     return NULL;
 }
diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c
index f41c53f..c4b4d1a 100644
--- a/src/pulsecore/sound-file-stream.c
+++ b/src/pulsecore/sound-file-stream.c
@@ -334,8 +334,7 @@ int pa_play_file(
     return 0;
 
 fail:
-    if (u)
-        file_stream_unref(u);
+    file_stream_unref(u);
 
     if (fd >= 0)
         pa_close(fd);

-- 
hooks/post-receive
PulseAudio Sound Server



More information about the pulseaudio-commits mailing list