Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Patch by Sourceforge user serval2412 to fix some resource leaks.

  • Loading branch information...
commit d983ee14a8b01f7c54fb9c9c42e44d8d4e6c9b14 1 parent f5d451c
michal-n authored
View
6 Unicode/dump.c
@@ -963,7 +963,8 @@ return 1;
}
if (( header = fopen( "chardata.h", "w" ))==NULL ) {
fprintf( stderr, "Can't open %s\n", "chardata.h" );
-return 1;
+ fclose(output);
+ return 1;
}
fprintf( header, "#include \"basics.h\"\n\n" );
@@ -976,11 +977,14 @@ return 1;
if (( output = fopen( "cjk.c", "w" ))==NULL ) {
fprintf( stderr, "Can't open %s\n", "cjk.c" );
+ fclose(header);
return 1;
}
dumpcjks(output,header);
+ fclose(output);
if (( output = fopen( "backtrns.c", "w" ))==NULL ) {
fprintf( stderr, "Can't open %s\n", "cjk.c" );
+ fclose(header);
return 1;
}
dumptrans(output,header);
View
20 cidmapsrc/mapcns1.c
@@ -191,14 +191,18 @@ int main(int argc, char **argv) {
}
pua = fopen("cns14.pua","w");
- for ( i=0; i<0xf8ff-0xe000; i+=8 ) {
- int j;
- fprintf(pua, "/* %0X */\t", i+0xe000 );
- for ( j=0; j<8; ++j )
- if ( puamap[i+j]!=0 )
- fprintf(pua, "0x%05x,%s", puamap[i+j], j==7 ? "\n" : " " );
- else
- fprintf(pua, " 0x0,%s", j==7 ? "\n" : " " );
+ if (pua) {
+ for ( i=0; i<0xf8ff-0xe000; i+=8 ) {
+ int j;
+ fprintf(pua, "/* %0X */\t", i+0xe000 );
+ for ( j=0; j<8; ++j ) {
+ if ( puamap[i+j]!=0 )
+ fprintf(pua, "0x%05x,%s", puamap[i+j], j==7 ? "\n" : " " );
+ else
+ fprintf(pua, " 0x0,%s", j==7 ? "\n" : " " );
+ }
+ }
+ fclose(pua);
}
return( 0 );
View
1  fontforge/cvimages.c
@@ -1118,6 +1118,7 @@ return( false );
++tot;
}
}
+ closedir(dir);
if ( tot==0 )
ff_post_error(_("Nothing Loaded"),_("Nothing Loaded"));
return( true );
View
2  fontforge/fontview.c
@@ -4814,6 +4814,7 @@ return;
if ( (nl = LoadNamelist(temp))==NULL ) {
ff_post_error(_("Bad namelist file"),_("Could not parse %s"), ret );
free(ret); free(temp);
+ fclose(old);
return;
}
free(ret); free(temp);
@@ -4827,6 +4828,7 @@ return;
new = fopen( buffer,"w");
if ( new==NULL ) {
ff_post_error(_("Create failed"),_("Could not write %s"), buffer );
+ fclose(old);
return;
}
View
6 fontforge/stamp.c
@@ -1,5 +1,5 @@
#include <time.h>
-const time_t source_modtime = 1337027473L;
-const char *source_modtime_str = "20:31 GMT 14-May-2012";
-const char *source_version_str = "20120514";
+const time_t source_modtime = 1337531042L;
+const char *source_modtime_str = "16:24 GMT 20-May-2012";
+const char *source_version_str = "20120520";
Please sign in to comment.
Something went wrong with that request. Please try again.