[libdmapsharing] Fix two errors identified by Coverity (GNOME bug #749886)



commit 3dbaeefc953e8fe8e8e1f3d47cdd75f72ae2ae9e
Author: W. Michael Petullo <mike flyn org>
Date:   Sun May 31 21:00:51 2015 -0400

    Fix two errors identified by Coverity (GNOME bug #749886)
    
    Signed-off-by: W. Michael Petullo <mike flyn org>

 libdmapsharing/daap-share.c               |   10 +++++-----
 libdmapsharing/dmap-gst-qt-input-stream.c |    2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/libdmapsharing/daap-share.c b/libdmapsharing/daap-share.c
index d9fa1a6..430e029 100644
--- a/libdmapsharing/daap-share.c
+++ b/libdmapsharing/daap-share.c
@@ -523,6 +523,10 @@ _error:
        soup_message_set_status (message, SOUP_STATUS_INTERNAL_SERVER_ERROR);
 
        if (NULL != cd) {
+               if (NULL != cd->stream) {
+                       g_input_stream_close (cd->stream, NULL, NULL);
+               }
+
                g_free (cd);
        }
 
@@ -537,11 +541,7 @@ _error:
        if (NULL != error) {
                g_error_free (error);
        }
-       
-       if (NULL != cd->stream) {
-               g_input_stream_close (cd->stream, NULL, NULL);
-       }
-       
+
        if (NULL != stream) {
                g_input_stream_close (stream, NULL, NULL);
        }
diff --git a/libdmapsharing/dmap-gst-qt-input-stream.c b/libdmapsharing/dmap-gst-qt-input-stream.c
index 5be6215..b35ff60 100644
--- a/libdmapsharing/dmap-gst-qt-input-stream.c
+++ b/libdmapsharing/dmap-gst-qt-input-stream.c
@@ -126,7 +126,7 @@ dmap_gst_qt_input_stream_new (GInputStream * src_stream)
 
        gst_bin_add_many (GST_BIN (pipeline), src, decode, convert, audio_encode, mux, sink, NULL);
 
-       if (FALSE == gst_element_link (stream->priv->src, stream->priv->decode)) {
+       if (FALSE == gst_element_link (src, decode)) {
                g_warning ("Error linking source and decode elements");
                goto done;
        }


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