Fix double free after second PUT attempt
This commit is contained in:
parent
e82cca6076
commit
7f0ace729c
@ -12,6 +12,10 @@ ChangeLog for davfs2
|
||||
increasing delays.
|
||||
* webdav.c, dav_delete:
|
||||
If file is not found, try to unlock.
|
||||
* cache.c, update_node:
|
||||
Only remove created nodes when remote size > 0.
|
||||
* webdav.c, dav_put:
|
||||
Fix double free after second PUT attempt.
|
||||
|
||||
2009-06-06 Werner Baumann (werner.baumann@onlinehome.de)
|
||||
* cache.c, dav_statfs:
|
||||
|
@ -781,7 +781,7 @@ dav_tidy_cache(void)
|
||||
}
|
||||
if (ret == EACCES || ret == EINVAL || ret == ENOENT
|
||||
|| ret == EPERM || ret == ENOSPC || ret == EEXIST
|
||||
|| set_next_upload_attempt(node) < 0) {
|
||||
/*|| set_next_upload_attempt(node) < 0*/) {
|
||||
dav_unlock(node->path, &node->lock_expire);
|
||||
delete_cache_file(node->parent);
|
||||
node->parent->utime = 0;
|
||||
@ -2285,7 +2285,7 @@ update_node(dav_node *node, dav_props *props)
|
||||
}
|
||||
|
||||
if (is_created(node)) {
|
||||
if (!is_open(node) && (!is_locked(node) || props->size > 0)) {
|
||||
if (!is_open(node) && (props->size > 0)) {
|
||||
add_node(node->parent, props);
|
||||
remove_node(node);
|
||||
*flush = 1;
|
||||
|
@ -1011,7 +1011,7 @@ dav_put(const char *path, const char *cache_path, int *exists, time_t *expire,
|
||||
if (ret == EACCES && lock_discover(spath, expire) == 0) {
|
||||
|
||||
ne_request_destroy(req);
|
||||
ne_request *req = ne_request_create(session, "PUT", spath);
|
||||
req = ne_request_create(session, "PUT", spath);
|
||||
|
||||
if (!has_if_match_bug) {
|
||||
if (!*exists) {
|
||||
|
Loading…
Reference in New Issue
Block a user