[alsa-devel] [PATCH 8/8] coverity fix in alsa-libs
Renu Tyagi
renu.tyagi at samsung.com
Thu Sep 18 13:36:50 CEST 2014
Hi,
Bug Type : Null check before closing h
Files changed : pcm_hooks.c
PFA patch8
Thanks
Renu Tyagi
-------------------------------------------------------------------------
From 906a8b65911edfd9d8bef48450707685bf4b8980 Mon Sep 17 00:00:00 2001
From: renu tyagi <renu.tyagi at samsung.com>
Date: Thu, 18 Sep 2014 16:45:59 +0530
Subject: [PATCH 8/8] [pcm_hooks] : Null check before closing h
Signed-off-by: renu tyagi <renu.tyagi at samsung.com>
---
src/pcm/pcm_hooks.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/pcm/pcm_hooks.c b/src/pcm/pcm_hooks.c
index 0b93c64..ce1cf36 100644
--- a/src/pcm/pcm_hooks.c
+++ b/src/pcm/pcm_hooks.c
@@ -457,7 +457,8 @@ static int snd_pcm_hook_add_conf(snd_pcm_t *pcm, snd_config_t *root, snd_config_
err = hook_add_dlobj(pcm, h);
if (err < 0) {
- snd_dlclose(h);
+ if(h)
+ snd_dlclose(h);
return err;
}
return 0;
--
1.7.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch8.patch
Type: application/octet-stream
Size: 734 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140918/abc137e1/attachment.obj>
More information about the Alsa-devel
mailing list