Pass the correct size to realloc(). Fixes

2005-06-10  Federico Mena Quintero  <federico@ximian.com>

	* xdgmime.c (xdg_mime_init_from_directory): Pass the correct size
	to realloc().  Fixes https://bugs.freedesktop.org/show_bug.cgi?id=3506.
This commit is contained in:
Federico Mena Quintero 2005-06-10 05:33:58 +00:00 committed by Federico Mena Quintero
parent a4ed2092df
commit 252e7dfa84
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-06-10 Federico Mena Quintero <federico@ximian.com>
* xdgmime.c (xdg_mime_init_from_directory): Pass the correct size
to realloc(). Fixes https://bugs.freedesktop.org/show_bug.cgi?id=3506.
2005-06-09 Matthias Clasen <mclasen@redhat.com> 2005-06-09 Matthias Clasen <mclasen@redhat.com>
* xdgmimemagic.c: Don't declare errno, including errno.h * xdgmimemagic.c: Don't declare errno, including errno.h

View File

@ -140,7 +140,7 @@ xdg_mime_init_from_directory (const char *directory)
list->next = dir_time_list; list->next = dir_time_list;
dir_time_list = list; dir_time_list = list;
caches = realloc (caches, n_caches + 1); caches = realloc (caches, sizeof (XdgMimeCache *) * (n_caches + 1));
caches[n_caches] = cache; caches[n_caches] = cache;
n_caches++; n_caches++;