diff options
Diffstat (limited to 'src/offlinelogstorage/dlt_offline_logstorage.c')
-rw-r--r-- | src/offlinelogstorage/dlt_offline_logstorage.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/offlinelogstorage/dlt_offline_logstorage.c b/src/offlinelogstorage/dlt_offline_logstorage.c index 5eaf107..124b7a4 100644 --- a/src/offlinelogstorage/dlt_offline_logstorage.c +++ b/src/offlinelogstorage/dlt_offline_logstorage.c @@ -735,6 +735,7 @@ DLT_STATIC int dlt_logstorage_prepare_table(DltLogStorage *handle, int found = 0; char *keys = NULL; DltNewestFileName *tmp = NULL; + DltNewestFileName *prev_tmp = NULL; DltNewestFileName *new_tmp = NULL; if ((handle == NULL) || (data == NULL)) { @@ -775,6 +776,7 @@ DLT_STATIC int dlt_logstorage_prepare_table(DltLogStorage *handle, break; } else { + prev_tmp = tmp; tmp = tmp->next; } } @@ -798,7 +800,7 @@ DLT_STATIC int dlt_logstorage_prepare_table(DltLogStorage *handle, if (handle->newest_file_list == NULL) handle->newest_file_list = new_tmp; else - handle->newest_file_list->next = new_tmp; + prev_tmp->next = new_tmp; } } |