gtk: Filename returned by GTK+ should be freed.
This commit is contained in:
parent
434065bcdf
commit
637a99ea66
1 changed files with 3 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue