These were detected using clang static analyzer.
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
} else if (dbus_message_is_signal(m, "org.bluez.MediaTransport", "PropertyChanged")) {
pa_bluetooth_device *d;
- pa_bluetooth_transport *t;
+ pa_bluetooth_transport *t = NULL;
void *state = NULL;
DBusMessageIter arg_i;
const char *path, *dev_path = NULL, *uuid = NULL;
uint8_t *config = NULL;
int size = 0;
- pa_bool_t nrec;
+ pa_bool_t nrec = FALSE;
enum profile p;
DBusMessageIter args, props;
DBusMessage *r;
int pa__init(pa_module*m) {
pa_modargs *ma = NULL;
- int ret = -1, fd = -1;
+ int ret = -1;
+ int32_t fd = -1;
char x = 1;
pa_assert(m);
int pa__init(pa_module*m) {
pa_iochannel *io;
pa_modargs *ma;
- int32_t fd;
+ int32_t fd = -1;
int r = -1;
pa_native_options *options = NULL;
goto finish;
}
- if (pa_modargs_get_value_s32(ma, "fd", &fd) < 0) {
+ if (pa_modargs_get_value_s32(ma, "fd", &fd) < 0 || fd < 0) {
pa_log("Invalid file descriptor.");
goto finish;
}
}
ss = m->core->default_sample_spec;
+ map = m->core->default_channel_map;
if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_DEFAULT) < 0) {
pa_log("Invalid sample format specification or channel map");
goto fail;
/* Note: This function takes ownership of the 'formats' param, so we need
* to take extra care to not leak it */
- playback_stream *s, *ssync;
+ playback_stream *ssync;
+ playback_stream *s = NULL;
pa_sink_input *sink_input = NULL;
pa_memchunk silence;
uint32_t idx;