[It'd be great, btw, if the people who care about pilrc development were
on the pilrc-developer mailing list. :-)]
Somebody submitted a bug report on sourceforge having tracked down why
pilrcui is currently broken.
It's due to this 2.8p7 patch of Neil's:
> n pilrc.c, there's a memory leak which can be fixed.
[...]
> FreeSymTable();
> FreeTranslations();
> CloseResFile();
>+ FreeRcpfile(prcpfile);
> if (vfPrc)
> CloseResDBFile();
> return prcpfile;
Given that the code immediately returns prcpfile, it's a bit surprising
that Neil thought it would be a good idea to free it. :-)
My fix is below.
John
==
diff -urNp orig/pilrc-2.9/main.c pilrc-2.9/main.c
--- orig/pilrc-2.9/main.c Fri Feb 22 10:08:56 2002
+++ pilrc-2.9/main.c Wed Mar 27 21:16:46 2002
@@ -391,7 +391,7 @@ main(int cArg,
ResTypeInit();
CbInit();
- ParseFile(szInputFile, szOutputPath, szResFile, szIncFile, fontType);
+ FreeRcpfile(ParseFile(szInputFile, szOutputPath, szResFile, szIncFile, fontType));
return 0;
}
diff -urNp orig/pilrc-2.9/pilrc.c pilrc-2.9/pilrc.c
--- orig/pilrc-2.9/pilrc.c Mon Nov 12 09:25:54 2001
+++ pilrc-2.9/pilrc.c Wed Mar 27 21:16:52 2002
@@ -6867,7 +6867,6 @@ ParseFile(char *szIn,
FreeSymTable();
FreeTranslations();
CloseResFile();
- FreeRcpfile(prcpfile);
if (vfPrc)
CloseResDBFile();
return prcpfile;
|