Fix double free after second PUT attempt
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user