fix: do not overwrite update package list
This commit is contained in:
parent
7564835b7d
commit
a641ef87ed
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-08-16 01:04+0300\n"
|
||||
"POT-Creation-Date: 2024-08-16 03:06+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -32,9 +32,15 @@ lm_ctx_update_list_t *lm_ctx_update_list(lm_ctx_t *ctx){
|
||||
list->entries = malloc(sizeof(lm_entry_t*)*(++list->count));
|
||||
else
|
||||
list->entries = realloc(list->entries, sizeof(lm_entry_t*)*(++list->count));
|
||||
|
||||
list->entries[list->count-1] = cur;
|
||||
cur = malloc(sizeof(lm_entry_t));
|
||||
lm_entry_init(cur);
|
||||
}
|
||||
|
||||
lm_entry_free(cur);
|
||||
free(cur);
|
||||
|
||||
lm_ctx_database_next_free(ctx, NULL);
|
||||
return list;
|
||||
}
|
||||
@ -63,8 +69,10 @@ void lm_ctx_update_list_free(lm_ctx_update_list_t *list){
|
||||
}
|
||||
|
||||
if(NULL != list->entries){
|
||||
for(int i = 0; i < list->count; i++)
|
||||
for(int i = 0; i < list->count; i++){
|
||||
lm_entry_free(list->entries[i]);
|
||||
free(list->entries[i]);
|
||||
}
|
||||
free(list->entries);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user