char portstring[20];
memset(portstring, 0, sizeof(portstring));
snprintf(portstring, sizeof(portstring), "%u", port);
- send_ssnc_metadata('dapo', strdup(portstring), strlen(portstring), 0);
+ send_ssnc_metadata('dapo', portstring, strlen(portstring), 0);
#endif
}
} else {
if (item != NULL) {
char *typeValue = NULL;
plist_get_string_val(item, &typeValue);
- if (strcmp(typeValue, "updateMRSupportedCommands") == 0) {
+ if ((typeValue != NULL) && (strcmp(typeValue, "updateMRSupportedCommands") == 0)) {
item = plist_dict_get_item(command_dict, "params");
if (item != NULL) {
// the item should be a dict
"POST /command plist type is \"%s\", but \"updateMRSupportedCommands\" expected.",
typeValue);
}
+ if (typeValue != NULL)
+ free(typeValue);
} else {
debug(1, "Could not get the \"type\" item.");
}
debug(1, "Connection %d: missing plist!", conn->connection_number);
resp->respcode = 451; // don't know what to do here
}
+ if (conn->dacp_active_remote != NULL) {
+ free(conn->dacp_active_remote);
+ conn->dacp_active_remote = NULL;
+ }
debug(1,"Bogus exit for valgrind.");
exit(EXIT_SUCCESS); //
}
char *uuid = malloc(UUID_STR_LEN);
// Produces a UUID string at uuid consisting of lower-case letters
uuid_unparse_lower(binuuid, uuid);
- config.airplay_pi = strdup(uuid);
+ config.airplay_pi = uuid;
debug(1, "Started in Airplay 2 mode on device \"%s\"!", config.airplay_device_id);
#else
debug(1, "Started in Airplay 1 mode!");