com gtk/php-gtk: Fix memory leak.: ext/scintilla/scintilla.overrides
[email protected] (David Soria Parra)
| Newsgroups | php.gtk.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit: 59a99cb4d93acd8c4824f1eda1026d83e9befcbf Author: Anant Narayanan <[email protected]> Mon, 10 Apr 2006 15:46:21 +0000 Parents: bf537ccfa76afe1ab3906d3159623d6772091fbc Branches: master Link: http://git.php.net/?p=gtk/php-gtk.git;a=commitdiff;h=59a99cb4d93acd8c4824f1eda1026d83e9befcbf Log: Fix memory leak. Changed paths: M ext/scintilla/scintilla.overrides Diff: 59a99cb4d93acd8c4824f1eda1026d83e9befcbf diff --git a/ext/scintilla/scintilla.overrides b/ext/scintilla/scintilla.overrides index 9616cc8..54dd323 100644 --- a/ext/scintilla/scintilla.overrides +++ b/ext/scintilla/scintilla.overrides @@ -32,8 +32,8 @@ PHP_METHOD result = gtk_scintilla_get_text(GTK_SCINTILLA(PHPG_GOBJECT(this_ptr)), length, text); if(result) { - RETURN_STRING(text, 1); - } else { - RETURN_EMPTY_STRING(); + RETVAL_STRINGL(text, length-1, 1); } + + efree(text); }