Fix memory leak when returning zero-length strings from V8 (issue #581).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@604 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2012-04-25 20:01:10 +00:00
parent 00fbc510da
commit 7987af5acf
2 changed files with 7 additions and 1 deletions

View File

@ -414,7 +414,7 @@ class CefStringBase {
// Clear the string data.
///
void clear() {
if (!empty())
if (string_)
traits::clear(string_);
}