summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/protocol-simple.c
diff options
context:
space:
mode:
authorAndy Shevchenko <ext-andriy.shevchenko@nokia.com>2009-08-28 15:16:54 +0300
committerLennart Poettering <lennart@poettering.net>2009-08-28 17:12:44 +0200
commit300384ce0aa79bd86cdafa88848c6e944c0353b5 (patch)
treeeb95d8af827f8aed4e3801046e4f922ff4dd59a6 /src/pulsecore/protocol-simple.c
parentae383539d7001d59044e6d7e06e9270b65ae762b (diff)
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.
Diffstat (limited to 'src/pulsecore/protocol-simple.c')
-rw-r--r--src/pulsecore/protocol-simple.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pulsecore/protocol-simple.c b/src/pulsecore/protocol-simple.c
index 95ec6ac8..488d7572 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) {