From 05ad8778579b547e575fbf0f28c3dc71061367d7 Mon Sep 17 00:00:00 2001 From: nanardon Date: Sun, 11 Jun 2006 01:39:12 +0000 Subject: - fix segfault in Header->files(): refresh stack git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@103 971eb68f-4bfb-0310-8326-d2484c010a4c --- RPM4/src/RPM4.xs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs index 3da7112..6fb1003 100644 --- a/RPM4/src/RPM4.xs +++ b/RPM4/src/RPM4.xs @@ -1294,9 +1294,10 @@ Header_files(header, scaremem = O_SCAREMEM) #ifdef HDLISTDEBUG PRINTF_CALL; #endif + SPAGAIN; Files = rpmfiNew(ts, header, RPMTAG_BASENAMES, scaremem); - if (Files != NULL && (Files = rpmfiInit(Files, 0)) != NULL && rpmfiNext(Files) >= 0) { - XPUSHs(sv2_mortal(sv_setref_pv(newSVpv("", 0), bless_rpmfi, Files))); + if (Files != NULL && (Files = rpmfiInit(Files, 0)) != NULL && rpmfiNext(Files) >= 0) { + XPUSHs(sv_setref_pv(sv_newmortal(), bless_rpmfi, (void *)Files)); #ifdef HDRPMMEM PRINTF_NEW(bless_rpmfi, Files, Files->nrefs); #endif -- cgit v1.2.1