diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/lib/bluealsa/hal-bluealsa-transports.c | 2 | ||||
-rw-r--r-- | plugins/lib/bluealsa/hal-bluealsa.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/plugins/lib/bluealsa/hal-bluealsa-transports.c b/plugins/lib/bluealsa/hal-bluealsa-transports.c index 341fb6b..8638b36 100644 --- a/plugins/lib/bluealsa/hal-bluealsa-transports.c +++ b/plugins/lib/bluealsa/hal-bluealsa-transports.c @@ -35,7 +35,7 @@ bluealsa_transport_t * halBlueAlsaTransportsAdd( const struct ba_msg_transport * transport) { bluealsa_transport_t * newTransport = (bluealsa_transport_t*) calloc(1, sizeof(bluealsa_transport_t)); - if (newTransport == NULL) + if (!newTransport) goto fail; memcpy(&newTransport->transport, transport, sizeof(struct ba_msg_transport)); 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; /* |