summaryrefslogtreecommitdiffstats
path: root/plugins/lib/bluealsa/hal-bluealsa.c
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2019-05-22 15:12:11 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2019-05-24 16:31:22 +0200
commit06054f68c5d5ca216f2756e7de2787a7ea2b9488 (patch)
tree45332bf88713260528cd8807180d14c796dd0d68 /plugins/lib/bluealsa/hal-bluealsa.c
parent701bea793ed1d2e20d036957268a71973c975cda (diff)
Add forgotten verifications of allocation results
Concern several types of allocation such as : - malloc/calloc - json_object_new_* - wrap_json_pack - strdup BUG-AGL: SPEC-2329 Change-Id: Iffe2a6a44ef4df2ed0ec4d159682159db5e78cfb Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'plugins/lib/bluealsa/hal-bluealsa.c')
-rw-r--r--plugins/lib/bluealsa/hal-bluealsa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/lib/bluealsa/hal-bluealsa.c b/plugins/lib/bluealsa/hal-bluealsa.c
index efce322..ca49bda 100644
--- a/plugins/lib/bluealsa/hal-bluealsa.c
+++ b/plugins/lib/bluealsa/hal-bluealsa.c
@@ -125,6 +125,9 @@ CTLP_CAPI(init, source, argsJ, queryJ)
CtlPluginT * plugin = source->plugin;
hal_bluealsa_plugin_data_t * pluginData = (hal_bluealsa_plugin_data_t*) calloc(1, sizeof(hal_bluealsa_plugin_data_t));
+ if(!pluginData)
+ goto fail;
+
int error;
/*