mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-07 03:17:13 +08:00
Fix free path twice (#2680)
Co-authored-by: heran yang <heran.yang@seafile.com>
This commit is contained in:
parent
f3b2eb7372
commit
9ab77f59d2
@ -676,8 +676,6 @@ do_check_file_locked (const char *path, const char *worktree, gboolean locked_on
|
||||
ret = TRUE;
|
||||
goto out;
|
||||
}
|
||||
g_free (tmp_name);
|
||||
g_free (fullpath);
|
||||
|
||||
/* Sometimes the first two characters are replaced by ~$. */
|
||||
|
||||
@ -685,6 +683,8 @@ do_check_file_locked (const char *path, const char *worktree, gboolean locked_on
|
||||
goto out;
|
||||
|
||||
char *ptr = g_utf8_find_next_char(g_utf8_find_next_char (file_name, NULL), NULL);
|
||||
g_free (tmp_name);
|
||||
g_free (fullpath);
|
||||
tmp_name = g_strconcat ("~$", ptr, NULL);
|
||||
fullpath = g_build_path ("/", worktree, dir_name, tmp_name, NULL);
|
||||
if (g_file_test (fullpath, G_FILE_TEST_IS_REGULAR)) {
|
||||
|
Loading…
Reference in New Issue
Block a user