Fix another memleak

svn path=/branches/gtk-2-10/; revision=17051
This commit is contained in:
Matthias Clasen
2007-01-04 05:10:14 +00:00
parent dd983a4f17
commit 33b805ba1d
2 changed files with 11 additions and 6 deletions

View File

@@ -1,5 +1,8 @@
2007-01-03 Matthias Clasen <mclasen@redhat.com>
* modules/printbackends/cups/gtkprintbackendcups.c
(available_choices): Don't leak conflicts.
* gtk/gtkprintoperation.c (gtk_print_operation_finalize):
Don't leak the status string.

View File

@@ -1777,12 +1777,13 @@ available_choices (ppd_file_t *ppd,
all_default = FALSE;
}
if (all_default && !keep_if_only_one_option)
return 0;
if (num_conflicts == option->num_choices)
return 0;
if ((all_default && !keep_if_only_one_option) ||
(num_conflicts == option->num_choices))
{
g_free (conflicts);
return 0;
}
/* Some ppds don't have a "use printer default" option for
* InputSlot. This means you always have to select a particular slot,
@@ -1821,7 +1822,6 @@ available_choices (ppd_file_t *ppd,
if (available)
{
*available = g_new (ppd_choice_t *, option->num_choices - num_conflicts + add_auto);
i = 0;
@@ -1834,6 +1834,8 @@ available_choices (ppd_file_t *ppd,
if (add_auto)
(*available)[i++] = NULL;
}
g_free (conflicts);
return option->num_choices - num_conflicts + add_auto;
}