Set the FD inside to -1 (as opposed to 0).
If something fails during init, that FD gets closed.
Change-Id: Ic50cadabc7ca4ec514e40878d49df027e450e61c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
if (!ret)
return NULL;
+ init_fd_entity(&ret->common.fd_entity_sink , NULL, NULL);
+ init_fd_entity(&ret->common.fd_entity_source, NULL, NULL);
+
ret->buf_id = LOG_ID_INVALID;
ret->common.service_reader = service_reader_logger;
if (!ret)
return NULL;
+ init_fd_entity(&ret->common.fd_entity_sink , NULL, NULL);
+ init_fd_entity(&ret->common.fd_entity_source, NULL, NULL);
+
ret->common.service_reader = print_out_logs;
ret->filter = log_filter_move(filter);
ret->monitor = monitor;