1
0
mirror of https://gitlab.gnome.org/GNOME/evince synced 2024-06-28 13:44:46 +00:00

properties: simplify freeing memory by better exploiting glib functions

This commit is contained in:
Pablo Correa Gómez 2023-03-14 18:59:22 +01:00
parent b477c21c6d
commit 200be9b923
No known key found for this signature in database
GPG Key ID: 7A342565FF635F79

View File

@ -97,10 +97,7 @@ ev_properties_view_dispose (GObject *object)
{
EvPropertiesView *properties = EV_PROPERTIES_VIEW (object);
if (properties->uri) {
g_free (properties->uri);
properties->uri = NULL;
}
g_clear_pointer (&properties->uri, g_free);
G_OBJECT_CLASS (ev_properties_view_parent_class)->dispose (object);
}
@ -352,8 +349,7 @@ ev_regular_paper_size (const EvDocumentInfo *info)
}
}
g_list_foreach (paper_sizes, (GFunc) gtk_paper_size_free, NULL);
g_list_free (paper_sizes);
g_list_free_full (paper_sizes, (GDestroyNotify)gtk_paper_size_free);
if (str != NULL) {
g_free (exact_size);