mirror of
https://github.com/electron/electron.git
synced 2026-01-27 00:09:09 -05:00
gtk: Filename returned by GTK+ should be freed.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user