Skip to content

Commit

Permalink
Merge pull request #686 from mydumper/fix_683
Browse files Browse the repository at this point in the history
Fix to remove double free issue
  • Loading branch information
davidducos committed May 16, 2022
2 parents 3a49fa2 + b4a55d2 commit b435925
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/myloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ int main(int argc, char *argv[]) {
exit(EXIT_FAILURE);
}
} else {
pwd=g_str_has_prefix(input_directory,"/")?g_strdup(""):current_dir;
directory=g_strdup_printf("%s/%s", pwd, input_directory);
g_free(pwd);
directory=g_strdup_printf("%s/%s", g_str_has_prefix(input_directory,"/")?"":current_dir, input_directory);
if (!g_file_test(input_directory,G_FILE_TEST_IS_DIR)){
if (stream){
create_backup_dir(directory);
Expand Down

0 comments on commit b435925

Please sign in to comment.