diff options
author | 2019-05-22 15:12:11 +0200 | |
---|---|---|
committer | 2019-05-24 16:31:22 +0200 | |
commit | 06054f68c5d5ca216f2756e7de2787a7ea2b9488 (patch) | |
tree | 45332bf88713260528cd8807180d14c796dd0d68 /plugins/lib/bluealsa/hal-bluealsa-transports.c | |
parent | 701bea793ed1d2e20d036957268a71973c975cda (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-transports.c')
-rw-r--r-- | plugins/lib/bluealsa/hal-bluealsa-transports.c | 2 |
1 files changed, 1 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)); |