[kaffe] CVS kaffe (doogie): Various gcc and sparse fixes all
over the board.
Helmer Krämer
hkraemer at freenet.de
Tue Dec 21 02:41:59 PST 2004
On Tue, 21 Dec 2004 00:11:20 -0800
Kaffe CVS <cvs-commits at kaffe.org> wrote:
Hi,
> @@ -66,7 +66,7 @@
>
> #if defined(HANDLE_MANIFEST_CLASSPATH)
> static int isEntryInClasspath(const char*);
> -static uint8* getManifestMainAttribute(jarFile*, char*);
> +static uint8* getManifestMainAttribute(jarFile*, const char*);
> static void handleManifestClassPath (classpathEntry *);
> #endif
>
> @@ -134,9 +134,8 @@
> case CP_DIR:
> case CP_ZIPFILE:
> class = newClass();
> - if (class == 0) {
> + if (class == NULL) {
> postOutOfMemory(einfo);
> - KFREE(hand.base);
> return (NULL);
> }
>
> @@ -144,14 +143,13 @@
> class->centry = centry;
> class = readClass(class, &hand, NULL, einfo);
>
> - if (hand.base != 0) {
> + if (hand.base != NULL) {
> #if defined(KAFFE_STATS)
> if (hand.type == CP_ZIPFILE) {
> addToCounter(&jarmem, "vmmem-jar files", 1,
> -(jlong)GCSIZEOF(hand.base));
> }
> #endif
> - KFREE(hand.base);
> }
> return (class);
I think the removal of these two KFREE calls will leak memory, won't it?
Regards,
Helmer
More information about the kaffe
mailing list