File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -1043,7 +1043,6 @@ int RestartAOFWithSyncFile(void) {
10431043 new_incr_filename = getNewIncrAofName (temp_am );
10441044 new_incr_filepath = makePath (server .aof_dirname , new_incr_filename );
10451045 newfd = open (new_incr_filepath , O_WRONLY | O_TRUNC | O_CREAT , 0644 );
1046- sdsfree (new_incr_filepath );
10471046 if (newfd == -1 ) {
10481047 serverLog (LL_WARNING , "Can't open the append-only file %s: %s" , new_incr_filename , strerror (errno ));
10491048 goto cleanup ;
@@ -1065,6 +1064,7 @@ int RestartAOFWithSyncFile(void) {
10651064
10661065 /* Now, it will not goto clean up, then we can safely free new_base_filepath */
10671066 sdsfree (new_base_filepath );
1067+ sdsfree (new_incr_filepath );
10681068
10691069 /* Set the initial repl_offset, which will be applied to fsynced_reploff */
10701070 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