This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Newer -DLEAKTEST patch
[perl5.git] / ext / DB_File / DB_File.xs
index f77757c..8f2eda1 100644 (file)
@@ -560,12 +560,13 @@ SV *   sv ;
 {
     SV **      svp;
     HV *       action ;
-    DB_File    RETVAL = (DB_File)safemalloc(sizeof(DB_File_type)) ;
+    DB_File    RETVAL;
     void *     openinfo = NULL ;
-    INFO       * info  = &RETVAL->info ;
+    INFO       * info;
 
 /* printf("In ParseOpenInfo name=[%s] flags=[%d] mode = [%d]\n", name, flags, mode) ;  */
-    Zero(RETVAL, 1, DB_File_type) ;
+    Newz(777, RETVAL, 1, DB_File_type) ;
+    info  = &RETVAL->info ;
 
     /* Default to HASH */
     RETVAL->hash = RETVAL->compare = RETVAL->prefix = NULL ;