mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
Fixed initialization of va_list variable in debug() in common.cpp, and mismatched new/free() in io.cpp
This commit is contained in:
parent
376e199ebb
commit
fd56465931
2 changed files with 5 additions and 3 deletions
|
@ -668,8 +668,10 @@ void debug( int level, const wchar_t *msg, ... )
|
|||
|
||||
CHECK( msg, );
|
||||
|
||||
sb = format_string(L"%ls: ", program_name);
|
||||
sb.append(vformat_string(msg, va));
|
||||
sb = format_string(L"%ls: ", program_name);
|
||||
va_start(va, msg);
|
||||
sb.append(vformat_string(msg, va));
|
||||
va_end(va);
|
||||
|
||||
wcstring sb2;
|
||||
write_screen( sb, sb2 );
|
||||
|
|
2
io.cpp
2
io.cpp
|
@ -152,7 +152,7 @@ void io_buffer_destroy( io_data_t *io_buffer )
|
|||
b_destroy( io_buffer->param2.out_buffer );
|
||||
|
||||
free( io_buffer->param2.out_buffer );
|
||||
free( io_buffer );
|
||||
delete io_buffer;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue