From: Carlos Garcia Campos Date: Sat, 19 Aug 2006 18:34:13 +0000 (+0000) Subject: Fix memory leak. X-Git-Tag: EVINCE_0_6_0~37 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=c9ea2bcbed22ab98363d73825e614e0b91c60fcf;p=evince.git Fix memory leak. 2006-08-19 Carlos Garcia Campos * pdf/ev-poppler.cc: (pdf_document_search_free): Fix memory leak. --- diff --git a/ChangeLog b/ChangeLog index 702ddde3..ae76c642 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-08-19 Carlos Garcia Campos + + * pdf/ev-poppler.cc: (pdf_document_search_free): + + Fix memory leak. + 2006-08-17 Nickolay V. Shmyrev * backend/ev-document-factory.c: diff --git a/pdf/ev-poppler.cc b/pdf/ev-poppler.cc index 8745d775..dc5510e6 100644 --- a/pdf/ev-poppler.cc +++ b/pdf/ev-poppler.cc @@ -136,8 +136,10 @@ pdf_document_search_free (PdfDocumentSearch *search) g_list_foreach (search->pages[i], (GFunc) g_free, NULL); g_list_free (search->pages[i]); } + g_free (search->pages); - g_free (search->text); + g_free (search->text); + g_free (search); } static void @@ -1259,10 +1261,6 @@ pdf_document_search_new (PdfDocument *pdf_document, search->text = g_strdup (text); search->pages = g_new0 (GList *, n_pages); - for (i = 0; i < n_pages; i++) { - search->pages[i] = NULL; - } - search->document = pdf_document; /* We add at low priority so the progress bar repaints */