aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/print_dlg.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-03-09 23:38:44 +0000
committerBill Meier <wmeier@newsguy.com>2009-03-09 23:38:44 +0000
commitcf930e3092e9438c3cad9ec66c7535ef41fe52c7 (patch)
treef526c86280a776d7e9d1c1b8806ba5a7d90fd33b /gtk/print_dlg.c
parent2236109a821d816cb877cdb8b05dda277e493ed6 (diff)
Fix a (very) minor memory leak; include tempfile.h only if _WIN32
svn path=/trunk/; revision=27686
Diffstat (limited to 'gtk/print_dlg.c')
-rw-r--r--gtk/print_dlg.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gtk/print_dlg.c b/gtk/print_dlg.c
index cb9aff2a2f..e597d298b7 100644
--- a/gtk/print_dlg.c
+++ b/gtk/print_dlg.c
@@ -38,7 +38,6 @@
#include "../print.h"
#include "../alert_box.h"
#include "../simple_dialog.h"
-#include "../tempfile.h"
#include "../util.h"
#include <wsutil/file_util.h>
@@ -58,6 +57,7 @@
#include <windows.h>
#include "gtk/file_dlg_win32.h"
#include "gtk/print_win32.h"
+#include "../tempfile.h"
#endif
/* dialog output action */
@@ -908,7 +908,7 @@ print_ok_cb(GtkWidget *ok_bt, gpointer parent_w)
#ifdef _WIN32
gboolean win_printer = FALSE;
int tmp_fd;
- char tmp_namebuf[128+1]; /* XXX - length was used elsewhere too, why? */
+ char tmp_namebuf[128+1]; /* XX: see create_tmpfile which says [128+1]; why ? */
char *tmp_oldfile;
#endif
cf_print_status_t status;
@@ -1095,6 +1095,7 @@ print_ok_cb(GtkWidget *ok_bt, gpointer parent_w)
/* trash temp file */
ws_remove(args->file);
+ g_free(args->file);
/* restore old settings */
args->to_file = FALSE;