mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00: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
1 changed files with 4 additions and 2 deletions
6
util.c
6
util.c
|
@ -977,8 +977,10 @@ void sb_destroy( string_buffer_t * b )
|
||||||
|
|
||||||
void sb_clear( string_buffer_t * b )
|
void sb_clear( string_buffer_t * b )
|
||||||
{
|
{
|
||||||
free( b->buff );
|
wchar_t c=0;
|
||||||
sb_init( b );
|
b->used=0;
|
||||||
|
b_append( b, &c, sizeof( wchar_t));
|
||||||
|
b->used -= sizeof(wchar_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue