diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-21 19:33:11 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-21 19:33:11 -0800 |
commit | 5fe7c065dc6cd7c3e9afd9ce5fade31ff7d7b198 (patch) | |
tree | 5e761ee733f99449ba1d0a069d08751babc2544c /builtin_complete.cpp | |
parent | e074ad48076f252764c4d17e21a1b17bc86a6dec (diff) |
Squash a bunch of leaks
Diffstat (limited to 'builtin_complete.cpp')
-rw-r--r-- | builtin_complete.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/builtin_complete.cpp b/builtin_complete.cpp index 0e6afc45..24175c96 100644 --- a/builtin_complete.cpp +++ b/builtin_complete.cpp @@ -292,7 +292,7 @@ static int builtin_complete( parser_t &parser, wchar_t **argv ) int authoritative = -1; int flags = COMPLETE_AUTO_SPACE; - string_buffer_t short_opt; + wcstring short_opt; wcstring_list_t gnu_opt, old_opt; const wchar_t *comp=L"", *desc=L"", *condition=L""; @@ -303,8 +303,6 @@ static int builtin_complete( parser_t &parser, wchar_t **argv ) static int recursion_level=0; - sb_init( &short_opt ); - argc = builtin_count_args( argv ); woptind=0; @@ -455,7 +453,7 @@ static int builtin_complete( parser_t &parser, wchar_t **argv ) break; case 's': - sb_append( &short_opt, woptarg ); + short_opt.append(woptarg); break; case 'l': @@ -604,7 +602,7 @@ static int builtin_complete( parser_t &parser, wchar_t **argv ) { builtin_complete_remove( cmd, path, - (wchar_t *)short_opt.buff, + short_opt.c_str(), gnu_opt, old_opt ); } @@ -612,7 +610,7 @@ static int builtin_complete( parser_t &parser, wchar_t **argv ) { builtin_complete_add( cmd, path, - (wchar_t *)short_opt.buff, + short_opt.c_str(), gnu_opt, old_opt, result_mode, |