mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 14:26:00 +01:00
Fixed some memory leaks
This commit is contained in:
parent
f2b24f75b5
commit
a819cf5126
3 changed files with 6 additions and 0 deletions
|
@ -72,6 +72,7 @@ cb_view_vadjustment_value_changed(GtkAdjustment *adjustment, gpointer data)
|
|||
/* add new page */
|
||||
GList* list = gtk_container_get_children(GTK_CONTAINER(Zathura.UI.page_view));
|
||||
GtkWidget* widget = (GtkWidget*) g_list_nth_data(list, page_id);
|
||||
g_list_free(list);
|
||||
|
||||
if(widget) {
|
||||
/* child packaging information */
|
||||
|
|
|
@ -48,6 +48,8 @@ pdf_document_open(zathura_document_t* document)
|
|||
|
||||
document->number_of_pages = poppler_document_get_n_pages(pdf_document->document);
|
||||
|
||||
g_free(file_uri);
|
||||
|
||||
return true;
|
||||
|
||||
error_free:
|
||||
|
|
3
utils.c
3
utils.c
|
@ -157,5 +157,8 @@ page_blank(unsigned int width, unsigned int height)
|
|||
gtk_image_set_from_pixbuf(GTK_IMAGE(image), pixbuf);
|
||||
gtk_widget_show(image);
|
||||
|
||||
free(buffer);
|
||||
g_object_unref(pixbuf);
|
||||
|
||||
return image;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue