gtk: Filename returned by GTK+ should be freed.

This commit is contained in:
Cheng Zhao 2014-03-13 13:22:49 +08:00
parent 434065bcdf
commit 637a99ea66

View file

@ -64,7 +64,9 @@ class FileChooserDialog {
base::FilePath GetFileName() const {
gchar* filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog_));
return base::FilePath(filename);
base::FilePath path(filename);
g_free(filename);
return path;
}
CHROMEGTK_CALLBACK_1(FileChooserDialog, void,