[PATCH v2 07/12] core: Add missing return on protocol error

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

 



From: Peter Meerwald <p.meerwald@xxxxxxxxxxxxxxxxxx>

CID 1323582

when a protocol error occors, better bail out :)
---
 src/pulsecore/protocol-native.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index ec223be..145db04 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
@@ -2639,8 +2639,10 @@ static void setup_srbchannel(pa_native_connection *c) {
 static void command_enable_srbchannel(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
     pa_native_connection *c = PA_NATIVE_CONNECTION(userdata);
 
-    if (tag != (uint32_t) (size_t) c->srbpending)
+    if (tag != (uint32_t) (size_t) c->srbpending) {
         protocol_error(c);
+        return;
+    }
 
     pa_log_debug("Client enabled srbchannel.");
     pa_pstream_set_srbchannel(c->pstream, c->srbpending);
-- 
1.9.1



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

  Powered by Linux