[perl-Glib] Plug leak in newSVGParamSpec



commit f31bea87510fdd4e4b426066cb532329aaf7a8dc
Author: Kevin Ryde <user42 zip com au>
Date:   Thu Jan 21 21:28:44 2010 +0100

    Plug leak in newSVGParamSpec
    
    Signed-off-by: Torsten Schönfeld <kaffeetisch gmx de>

 GParamSpec.xs |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/GParamSpec.xs b/GParamSpec.xs
index 61dbea4..1c6a90e 100644
--- a/GParamSpec.xs
+++ b/GParamSpec.xs
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2003-2004 by the gtk2-perl team (see the file AUTHORS for
+ * Copyright (C) 2003-2004, 2010 by the gtk2-perl team (see the file AUTHORS for
  * the full list)
  *
  * This library is free software; you can redistribute it and/or modify it
@@ -142,7 +142,7 @@ SV *
 newSVGParamSpec (GParamSpec * pspec)
 {
 	const gchar * pv;
-	HV * property = newHV ();
+	HV * property;
 	SV * sv;
 	HV * stash;
 	const char * package;
@@ -153,6 +153,7 @@ newSVGParamSpec (GParamSpec * pspec)
 	g_param_spec_ref (pspec);
 	g_param_spec_sink (pspec);
 
+	property = newHV ();
 	sv_magic ((SV*)property, 0, PERL_MAGIC_ext, (const char*)pspec, 0);
 
 



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