This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use the system's free to dealloc a PV allocated by the system
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 21 Nov 2005 18:22:00 +0000 (19:22 +0100)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Tue, 22 Nov 2005 16:10:00 +0000 (16:10 +0000)
(more precisely by libgdbm.) See :

Subject: GDBM_file realloc failures
Message-ID: <20051121182200.0b3d2454@grubert.mandrakesoft.com>

p4raw-id: //depot/perl@26193

ext/GDBM_File/GDBM_File.xs

index 34acd79..5f88223 100644 (file)
@@ -39,12 +39,8 @@ not_here(char *s)
 static void
 output_datum(pTHX_ SV *arg, char *str, int size)
 {
-#if (!defined(MYMALLOC) || (defined(MYMALLOC) && defined(PERL_POLLUTE_MALLOC)))
-       sv_usepvn(arg, str, size);
-#else
        sv_setpvn(arg, str, size);
-       safesysfree(str);
-#endif
+       free(str);
 }
 
 /* Versions of gdbm prior to 1.7x might not have the gdbm_sync,