--- a/libidav/xml.c Tue Sep 12 21:07:54 2023 +0200 +++ b/libidav/xml.c Thu Sep 14 18:11:50 2023 +0200 @@ -397,9 +397,9 @@ attr->name = strdup(name); attr->value = strdup(value); - if(node->attributes) { - DavXmlAttr *last; + if(node->attributes) { DavXmlAttr *end = node->attributes; + DavXmlAttr* last = end; while(end) { last = end; end = end->next;