[perl-Glib] Plug a leak in Glib::Object->signal_query
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib] Plug a leak in Glib::Object->signal_query
- Date: Mon, 8 Aug 2011 15:23:20 +0000 (UTC)
commit a28f68cbefdc399e23ee3ebce8585653606b3758
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Mon Aug 8 17:23:06 2011 +0200
Plug a leak in Glib::Object->signal_query
Spotted by Kevin Ryde.
https://bugzilla.gnome.org/show_bug.cgi?id=653681
GSignal.xs | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/GSignal.xs b/GSignal.xs
index 5bdfffd..48c899e 100644
--- a/GSignal.xs
+++ b/GSignal.xs
@@ -657,10 +657,12 @@ g_signal_query (SV * object_or_class_name, const char * name)
croak ("couldn't ref type %s", g_type_name (itype));
}
signal_id = g_signal_lookup (name, itype);
- if (0 == signal_id)
- XSRETURN_UNDEF;
- g_signal_query (signal_id, &query);
- RETVAL = newSVGSignalQuery (&query);
+ if (0 == signal_id) {
+ RETVAL = &PL_sv_undef;
+ } else {
+ g_signal_query (signal_id, &query);
+ RETVAL = newSVGSignalQuery (&query);
+ }
if (oclass)
g_type_class_unref (oclass);
OUTPUT:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]