Fixed some memory leaks

This commit is contained in:
Moritz Lipp 2011-01-06 11:54:31 +01:00
parent f2b24f75b5
commit a819cf5126
3 changed files with 6 additions and 0 deletions

View file

@ -72,6 +72,7 @@ cb_view_vadjustment_value_changed(GtkAdjustment *adjustment, gpointer data)
/* add new page */ /* add new page */
GList* list = gtk_container_get_children(GTK_CONTAINER(Zathura.UI.page_view)); GList* list = gtk_container_get_children(GTK_CONTAINER(Zathura.UI.page_view));
GtkWidget* widget = (GtkWidget*) g_list_nth_data(list, page_id); GtkWidget* widget = (GtkWidget*) g_list_nth_data(list, page_id);
g_list_free(list);
if(widget) { if(widget) {
/* child packaging information */ /* child packaging information */

View file

@ -48,6 +48,8 @@ pdf_document_open(zathura_document_t* document)
document->number_of_pages = poppler_document_get_n_pages(pdf_document->document); document->number_of_pages = poppler_document_get_n_pages(pdf_document->document);
g_free(file_uri);
return true; return true;
error_free: error_free:

View file

@ -157,5 +157,8 @@ page_blank(unsigned int width, unsigned int height)
gtk_image_set_from_pixbuf(GTK_IMAGE(image), pixbuf); gtk_image_set_from_pixbuf(GTK_IMAGE(image), pixbuf);
gtk_widget_show(image); gtk_widget_show(image);
free(buffer);
g_object_unref(pixbuf);
return image; return image;
} }