Bug 538686 - gtkprintoperation-win32.c: devmode_from_settings

2008-08-02  Tor Lillqvist  <tml@novell.com>

	Bug 538686 - gtkprintoperation-win32.c: devmode_from_settings

	* gtk/gtkprintoperation-win32.c (devmode_from_settings): Plug
	potential leak. Thanks to Morten Welinder.


svn path=/trunk/; revision=20944
This commit is contained in:
Tor Lillqvist 2008-08-02 11:29:31 +00:00 committed by Tor Lillqvist
parent c364ffa340
commit 4998d8c469
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2008-08-02 Tor Lillqvist <tml@novell.com>
Bug 538686 - gtkprintoperation-win32.c: devmode_from_settings
* gtk/gtkprintoperation-win32.c (devmode_from_settings): Plug
potential leak. Thanks to Morten Welinder.
2008-08-02 Tor Lillqvist <tml@novell.com>
* gtk/gtkprint-win32.c

View File

@ -940,8 +940,8 @@ devmode_from_settings (GtkPrintSettings *settings,
{
devmode->dmDriverExtra = extras_len;
memcpy (((char *)devmode) + sizeof (DEVMODEW), extras, extras_len);
g_free (extras);
}
g_free (extras);
if (gtk_print_settings_has_key (settings, GTK_PRINT_SETTINGS_WIN32_DRIVER_VERSION))
devmode->dmDriverVersion = gtk_print_settings_get_int (settings, GTK_PRINT_SETTINGS_WIN32_DRIVER_VERSION);