[perl-Gtk2] Don't allocate more memory than required



commit 159a93d1d53dc5b45b0a2e7ae52c73671e26ab83
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Thu Jan 7 22:13:14 2010 +0100

    Don't allocate more memory than required
    
    Spotted by Emmanuel Rodriguez.

 xs/GtkAboutDialog.xs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/xs/GtkAboutDialog.xs b/xs/GtkAboutDialog.xs
index d6622d8..f1f54f0 100644
--- a/xs/GtkAboutDialog.xs
+++ b/xs/GtkAboutDialog.xs
@@ -19,7 +19,7 @@
 #define SETTER(outof)						\
 	{							\
 		gint num = items - 1;				\
-		(outof) = g_new0 (gchar *, num + 30);		\
+		(outof) = g_new0 (gchar *, num + 1);		\
 		for (i = 0; i < num; i++)			\
 			(outof)[i] = SvGChar (ST (1 + i));	\
 	}



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