OSDN Git Service

Add missing free after read device info
authorliuchao <liuchao741@huawei.com>
Thu, 1 Mar 2018 08:58:29 +0000 (16:58 +0800)
committerliuchao <liuchao741@huawei.com>
Thu, 1 Mar 2018 08:58:29 +0000 (16:58 +0800)
alsa_hw_params is not freed before get out
of function profile_read_device_info,calloc
from pcm_params_get in pcm.c

Test: code compilation
Change-Id: Icb1163d3dc213939243d26f57f8d22ca4edb1159

alsa_utils/alsa_device_profile.c

index 734edd7..1ab0d80 100644 (file)
@@ -415,6 +415,7 @@ bool profile_read_device_info(alsa_device_profile* profile)
 
     profile->is_valid = true;
 
+    pcm_params_free(alsa_hw_params);
     return true;
 }