mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-26 22:27:42 +08:00
Do not free allocated data when clearing a string_buffer_t
darcs-hash:20060109171302-ac50b-eda104ad21a80c99cc5f31e71973bbc835635b90.gz
This commit is contained in:
parent
8ed80deb6b
commit
fef1e1db32
6
util.c
6
util.c
@ -977,8 +977,10 @@ void sb_destroy( string_buffer_t * b )
|
||||
|
||||
void sb_clear( string_buffer_t * b )
|
||||
{
|
||||
free( b->buff );
|
||||
sb_init( b );
|
||||
wchar_t c=0;
|
||||
b->used=0;
|
||||
b_append( b, &c, sizeof( wchar_t));
|
||||
b->used -= sizeof(wchar_t);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user