devhelp r1109 - in trunk: . src



Author: rhult
Date: Fri Oct  3 15:16:11 2008
New Revision: 1109
URL: http://svn.gnome.org/viewvc/devhelp?rev=1109&view=rev

Log:
2008-10-03  Richard Hult  <richard imendio com>

	* src/dh-base.c: (base_add_books): Don't free the path string,
	fixes crash if the same book name is found more than once.


Modified:
   trunk/ChangeLog
   trunk/src/dh-base.c

Modified: trunk/src/dh-base.c
==============================================================================
--- trunk/src/dh-base.c	(original)
+++ trunk/src/dh-base.c	Fri Oct  3 15:16:11 2008
@@ -286,13 +286,13 @@
                         g_warning ("Failed to read '%s': %s",
                                    book_path, error->message);
                         g_clear_error (&error);
+
+                        g_free (book_path);
                 } else {
                         g_hash_table_insert (priv->books,
                                              g_strdup (name),
                                              book_path);
                 }
-
-                g_free (book_path);
         }
 
         g_dir_close (dir);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]