diff -r 74a6e2d4fb1f -r 40be8db6fe45 libidav/resource.c --- a/libidav/resource.c Sun Aug 08 16:50:36 2021 +0200 +++ b/libidav/resource.c Mon Aug 09 17:22:21 2021 +0200 @@ -153,7 +153,7 @@ dav_session_free(sn, p->ns); dav_session_free(sn, p->name); - dav_session_free(sn, p->value); + dav_free_xml_node_sn(sn, p->value); dav_session_free(sn, p); } @@ -600,7 +600,9 @@ DavResourceData *data = res->data; DavProperty *property = createprop(sn, ns, name); - property->value = value; // TODO: copy node? + // TODO: this function should copy the value + // but we also need a function, that doesn't create a copy + property->value = value; if(DAV_ENCRYPT_PROPERTIES(sn) && dav_namespace_is_encrypted(sn->context, ns)) { data->crypto_set = ucx_list_append_a(a, data->crypto_set, property);