summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 080f303)
raw | patch | inline | side by side (parent: 080f303)
author | Florian Forster <octo@verplant.org> | |
Tue, 17 Feb 2009 07:50:06 +0000 (08:50 +0100) | ||
committer | Florian Forster <octo@verplant.org> | |
Tue, 17 Feb 2009 07:53:56 +0000 (08:53 +0100) |
Thanks to "Iceberg" who reported this issue and provided the patch via
rt.cpan.org.
Signed-off-by: Florian Forster <octo@verplant.org>
rt.cpan.org.
Signed-off-by: Florian Forster <octo@verplant.org>
diff --git a/bindings/perl/Changes b/bindings/perl/Changes
index 3840e4e78362675e083e15c797f220553c02b840..c46c003c804bbd92b6366eedabc290c54d647ec4 100644 (file)
--- a/bindings/perl/Changes
+++ b/bindings/perl/Changes
Revision history for Perl extension Net::Oping.
+1.02 Tue Feb 17 08:52:25 2009
+ - Fix a memory leak in _ping_iterator_get_hostname() [fixes RT#37066]
+ Thanks to "Iceberg" for reporting this issue and providing the patch.
+
1.01 Sun Jan 27 16:08:03 2008
- Have `Makefile.PL' exit if the header file <oping.h> cannot be found
_before_ a Makefile is generated. This is done because
diff --git a/bindings/perl/META.yml b/bindings/perl/META.yml
index 3351afd730f51121e75f9099678b75b05491b873..7a71aa69b115a20c6e47816bab0ed8fbcbe2b504 100644 (file)
--- a/bindings/perl/META.yml
+++ b/bindings/perl/META.yml
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: Net-Oping
-version: 1.01
+version: 1.02
version_from: lib/Net/Oping.pm
installdirs: site
requires:
diff --git a/bindings/perl/Oping.xs b/bindings/perl/Oping.xs
index 0cebf3d921ba6df3ba4470b3fc28a97d5dfb0ca2..6376775e022bb912d8067f712a96d2afac88e83d 100644 (file)
--- a/bindings/perl/Oping.xs
+++ b/bindings/perl/Oping.xs
OUTPUT:
RETVAL
-char *
+void
_ping_iterator_get_hostname (iter)
pingobj_iter_t *iter
- CODE:
+ PPCODE:
char *buffer;
size_t buffer_size;
int status;
- RETVAL = NULL;
-
do {
buffer = NULL;
buffer_size = 0;
if (status != 0)
break;
- RETVAL = buffer;
+ XPUSHs (sv_2mortal (newSVpvn(buffer,buffer_size)));
+ free(buffer);
} while (0);
- OUTPUT:
- RETVAL
const char *
_ping_get_error (obj)
diff --git a/bindings/perl/README b/bindings/perl/README
index 2714e36b25d299b2cd0818b8b264c462458c6768..a550a723b47061c7204c21f05766e271023d6449 100644 (file)
--- a/bindings/perl/README
+++ b/bindings/perl/README
-Net::Oping version 1.01
+Net::Oping version 1.02
=======================
ICMP latency measurement module using the oping library.
index aeeedf05306786e30e939e18e3f11477564dcc69..6c59ecb4b43fff70e78e580db472be9f2548fe05 100644 (file)
use Carp (qw(cluck confess));
-our $VERSION = '1.01';
+our $VERSION = '1.02';
require XSLoader;
XSLoader::load ('Net::Oping', $VERSION);