vendor/libgit2/src/fileops.c in rugged-0.27.7 vs vendor/libgit2/src/fileops.c in rugged-0.27.9
- old
+ new
@@ -157,11 +157,11 @@
/* p_read loops internally to read len bytes */
read_size = p_read(fd, buf->ptr, len);
if (read_size != (ssize_t)len) {
giterr_set(GITERR_OS, "failed to read descriptor");
- git_buf_dispose(buf);
+ git_buf_free(buf);
return -1;
}
buf->ptr[read_size] = '\0';
buf->size = read_size;
@@ -207,19 +207,19 @@
p_close(fd);
if (checksum) {
if ((error = git_hash_buf(&checksum_new, buf.ptr, buf.size)) < 0) {
- git_buf_dispose(&buf);
+ git_buf_free(&buf);
return error;
}
/*
* If we were given a checksum, we only want to use it if it's different
*/
if (!git_oid__cmp(checksum, &checksum_new)) {
- git_buf_dispose(&buf);
+ git_buf_free(&buf);
if (updated)
*updated = 0;
return 0;
}
@@ -232,11 +232,11 @@
*/
if (updated != NULL)
*updated = 1;
git_buf_swap(out, &buf);
- git_buf_dispose(&buf);
+ git_buf_free(&buf);
return 0;
}
int git_futils_readbuffer(git_buf *buf, const char *path)
@@ -524,12 +524,12 @@
error = git_futils_mkdir_relative(relative,
parent_path.size ? parent_path.ptr : NULL, mode, flags, &opts);
done:
- git_buf_dispose(&make_path);
- git_buf_dispose(&parent_path);
+ git_buf_free(&make_path);
+ git_buf_free(&parent_path);
return error;
}
int git_futils_mkdir_r(const char *path, const mode_t mode)
{
@@ -659,11 +659,11 @@
error = GIT_ENOTFOUND;
}
}
done:
- git_buf_dispose(&make_path);
+ git_buf_free(&make_path);
return error;
}
typedef struct {
const char *base;
@@ -820,11 +820,11 @@
if (error == GIT_ITEROVER) {
giterr_clear();
error = 0;
}
- git_buf_dispose(&fullpath);
+ git_buf_free(&fullpath);
return error;
}
int git_futils_fake_symlink(const char *old, const char *new)
@@ -1079,11 +1079,11 @@
((flags & GIT_CPDIR_CHMOD_DIRS) != 0) ? GIT_MKDIR_CHMOD : 0;
}
error = _cp_r_callback(&info, &path);
- git_buf_dispose(&path);
- git_buf_dispose(&info.to);
+ git_buf_free(&path);
+ git_buf_free(&info.to);
return error;
}
int git_futils_filestamp_check(