wrc: Fixed some small leaks in PO code (Coverity).

This commit is contained in:
Marcus Meissner 2011-06-28 08:31:29 +02:00 committed by Alexandre Julliard
parent a27adc478a
commit b07408cf82
2 changed files with 7 additions and 1 deletions

View File

@ -325,6 +325,7 @@ static char *convert_msgid_ascii( const lanmsg_t *msg, int error_on_invalid_char
fprintf( stderr, "%s:%d: ", msg->file, msg->line );
error( "Invalid character %04x in source string\n", msg->msg[i] );
}
free( buffer );
return NULL;
}
buffer[i] = 0;

View File

@ -332,6 +332,7 @@ static char *convert_msgid_ascii( const string_t *str, int error_on_invalid_char
print_location( &newstr->loc );
error( "Invalid character %04x in source string\n", newstr->str.wstr[i] );
}
free( buffer);
free_string( newstr );
return NULL;
}
@ -940,7 +941,11 @@ void add_translations( const char *po_dir )
new_top = new_tail = NULL;
name = strmake( "%s/LINGUAS", po_dir );
if (!(f = fopen( name, "r" ))) return;
if (!(f = fopen( name, "r" )))
{
free( name );
return;
}
free( name );
while (fgets( buffer, sizeof(buffer), f ))
{