From 300384ce0aa79bd86cdafa88848c6e944c0353b5 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Fri, 28 Aug 2009 15:16:54 +0300 Subject: 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. --- src/pulsecore/sound-file-stream.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/pulsecore/sound-file-stream.c') diff --git a/src/pulsecore/sound-file-stream.c b/src/pulsecore/sound-file-stream.c index f41c53f3..c4b4d1a5 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); -- cgit