- If all log device paths are given and failed to get main fd,
libdlog will try to access log_fds[LOG_ID_MAX]
- No more access log_fds[LOG_ID_MAX]
Change-Id: I97197a5efeecae9713f6564f10327a262b255de2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
goto cleanup;
failure:
- for (; buf_id >= 0; buf_id--) {
+ for (buf_id = 0; buf_id < LOG_ID_MAX; buf_id++) {
if (log_fds[buf_id] >= 0)
close(log_fds[buf_id]);
}
goto cleanup;
failure:
- for (; buf_id >= 0; buf_id--) {
+ for (buf_id = 0; buf_id < LOG_ID_MAX; buf_id++) {
if (log_fds[buf_id] >= 0)
close(log_fds[buf_id]);
}