diff --git a/callbacks.c b/callbacks.c index 74a8648..dec83ba 100644 --- a/callbacks.c +++ b/callbacks.c @@ -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 */ diff --git a/ft/pdf/pdf.c b/ft/pdf/pdf.c index 0c31371..cbe3769 100644 --- a/ft/pdf/pdf.c +++ b/ft/pdf/pdf.c @@ -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: diff --git a/utils.c b/utils.c index 80cb3a5..91e9096 100644 --- a/utils.c +++ b/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; }