[-] Lots of housekeeping thanks to scan-build and input from @acmay

This commit is contained in:
ejurgensen
2016-11-19 23:08:50 +01:00
parent 8525c278ec
commit bdd6bab982
21 changed files with 159 additions and 81 deletions

View File

@@ -1323,10 +1323,17 @@ cast_session_make(struct output_device *device, int family, output_status_cb cb)
}
os = calloc(1, sizeof(struct output_session));
cs = calloc(1, sizeof(struct cast_session));
if (!os || !cs)
if (!os)
{
DPRINTF(E_LOG, L_CAST, "Out of memory for TLS session\n");
DPRINTF(E_LOG, L_CAST, "Out of memory (os)\n");
return NULL;
}
cs = calloc(1, sizeof(struct cast_session));
if (!cs)
{
DPRINTF(E_LOG, L_CAST, "Out of memory (cs)\n");
free(os);
return NULL;
}