# HG changeset patch # User Olaf Wintermann # Date 1730036202 -3600 # Node ID b4285fb0f582b27e12604669791f6d6336e6d4c1 # Parent 6a466635eace4318dbe1406f39cf0de324976fe3 fix pwdstore entries without locations not loaded correctly diff -r 6a466635eace -r b4285fb0f582 libidav/pwdstore.c --- a/libidav/pwdstore.c Wed Oct 23 19:12:51 2024 +0200 +++ b/libidav/pwdstore.c Sun Oct 27 14:36:42 2024 +0100 @@ -377,12 +377,13 @@ } PwdIndexEntry *newentry = malloc(sizeof(PwdIndexEntry)); newentry->id = id; - if(locations) { + if(cxListSize(locations) > 0) { newentry->locations = locations; cxListAdd(p->locations, newentry); } else { newentry->locations = NULL; cxListAdd(p->noloc, newentry); + cxListDestroy(locations); } cxMapPut(p->index, cx_hash_key_str(id), newentry); }