File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -2564,6 +2564,7 @@ pub const App = struct {
25642564 }
25652565
25662566 pub fn switchToSession (self : * App , target_session : []const u8 ) ! void {
2567+ std .debug .assert (target_session .len > 0 );
25672568 // Don't switch if already on the target session
25682569 if (self .current_session_name ) | current | {
25692570 if (std .mem .eql (u8 , current , target_session )) {
@@ -2578,8 +2579,10 @@ pub const App = struct {
25782579 try self .saveSession (name );
25792580 }
25802581
2582+ // Build arguments for exec
25812583 // Build arguments for exec
25822584 const target_z = try self .allocator .dupeZ (u8 , target_session );
2585+ errdefer self .allocator .free (target_z );
25832586 const args = [_ ]? [* :0 ]const u8 {
25842587 "prise" ,
25852588 "session" ,
You can’t perform that action at this time.
0 commit comments