< prev index next >

src/java.desktop/unix/native/common/awt/fontpath.c

Print this page

        

@@ -287,10 +287,11 @@
         /* printf ( "Appending %s\n", fDirP->name[index] ); */
 
         onePath = SAFE_SIZE_ARRAY_ALLOC(malloc, strlen (fDirP->name[index]) + 2, sizeof( char ) );
         if (onePath == NULL) {
             free ( ( void *) appendDirList );
+            free ( ( void *) newFontPath );
             XFreeFontPath ( origFontPath );
             return;
         }
         strcpy ( onePath, fDirP->name[index] );
         strcat ( onePath, "/" );
< prev index next >