diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-11-27 11:19:14 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-11-27 11:20:08 (GMT) |
commit | 61f2e17c497f683d7fa78232decb260bfa5b5d77 (patch) | |
tree | cec4350d88c2a7f42022c21545183447171e72fa /src | |
parent | 583b1529894aca5e9ffa353f0547dfb4b8b0ab21 (diff) | |
download | Qt-61f2e17c497f683d7fa78232decb260bfa5b5d77.zip Qt-61f2e17c497f683d7fa78232decb260bfa5b5d77.tar.gz Qt-61f2e17c497f683d7fa78232decb260bfa5b5d77.tar.bz2 |
Fixed a memory leak in the newer native filedialog on windows
Reviewed-by: denis
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/dialogs/qfiledialog_win.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/dialogs/qfiledialog_win.cpp b/src/gui/dialogs/qfiledialog_win.cpp index d8ae73e..0116319 100644 --- a/src/gui/dialogs/qfiledialog_win.cpp +++ b/src/gui/dialogs/qfiledialog_win.cpp @@ -534,7 +534,7 @@ QStringList qt_win_CID_get_open_file_names(const QFileDialogArgs &args, modal_widget.setParent(args.parent, Qt::Window); QApplicationPrivate::enterModal(&modal_widget); // Multiple selection is allowed only in IFileOpenDialog. - IFileOpenDialog *pfd; + IFileOpenDialog *pfd = 0; HRESULT hr = CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, @@ -607,6 +607,8 @@ QStringList qt_win_CID_get_open_file_names(const QFileDialogArgs &args, } } } + if (pfd) + pfd->Release(); return result; } |