printers: Ensure PPD copy is always deleted
This commit is contained in:
parent
81392210f2
commit
2ee5f1422a
1 changed files with 5 additions and 7 deletions
|
@ -1436,7 +1436,11 @@ static void
|
|||
psp_data_free (PSPData *data)
|
||||
{
|
||||
g_free (data->printer_name);
|
||||
g_free (data->ppd_copy);
|
||||
if (data->ppd_copy != NULL)
|
||||
{
|
||||
g_unlink (data->ppd_copy);
|
||||
g_free (data->ppd_copy);
|
||||
}
|
||||
g_clear_object (&data->cancellable);
|
||||
g_free (data);
|
||||
}
|
||||
|
@ -1479,12 +1483,6 @@ printer_set_ppd_async_dbus_cb (GObject *source_object,
|
|||
data->callback (data->printer_name,
|
||||
result,
|
||||
data->user_data);
|
||||
|
||||
if (data->ppd_copy)
|
||||
{
|
||||
g_unlink (data->ppd_copy);
|
||||
g_free (data->ppd_copy);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue