File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -1044,6 +1044,7 @@ int RestartAOFWithSyncFile(void) {
10441044 new_incr_filepath = makePath (server .aof_dirname , new_incr_filename );
10451045 newfd = open (new_incr_filepath , O_WRONLY | O_TRUNC | O_CREAT , 0644 );
10461046 sdsfree (new_incr_filepath );
1047+ new_incr_filepath = NULL ;
10471048 if (newfd == -1 ) {
10481049 serverLog (LL_WARNING , "Can't open the append-only file %s: %s" , new_incr_filename , strerror (errno ));
10491050 goto cleanup ;
@@ -1065,6 +1066,7 @@ int RestartAOFWithSyncFile(void) {
10651066
10661067 /* Now, it will not goto clean up, then we can safely free new_base_filepath */
10671068 sdsfree (new_base_filepath );
1069+ new_base_filepath = NULL ;
10681070
10691071 /* Set the initial repl_offset, which will be applied to fsynced_reploff */
10701072 atomic_store_explicit (& server .fsynced_reploff_pending , server .primary_repl_offset , memory_order_relaxed );
You can’t perform that action at this time.
0 commit comments