wrc: Fixed some small leaks in PO code (Coverity).
This commit is contained in:
parent
a27adc478a
commit
b07408cf82
|
@ -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 );
|
fprintf( stderr, "%s:%d: ", msg->file, msg->line );
|
||||||
error( "Invalid character %04x in source string\n", msg->msg[i] );
|
error( "Invalid character %04x in source string\n", msg->msg[i] );
|
||||||
}
|
}
|
||||||
|
free( buffer );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
buffer[i] = 0;
|
buffer[i] = 0;
|
||||||
|
|
|
@ -332,6 +332,7 @@ static char *convert_msgid_ascii( const string_t *str, int error_on_invalid_char
|
||||||
print_location( &newstr->loc );
|
print_location( &newstr->loc );
|
||||||
error( "Invalid character %04x in source string\n", newstr->str.wstr[i] );
|
error( "Invalid character %04x in source string\n", newstr->str.wstr[i] );
|
||||||
}
|
}
|
||||||
|
free( buffer);
|
||||||
free_string( newstr );
|
free_string( newstr );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -940,7 +941,11 @@ void add_translations( const char *po_dir )
|
||||||
new_top = new_tail = NULL;
|
new_top = new_tail = NULL;
|
||||||
|
|
||||||
name = strmake( "%s/LINGUAS", po_dir );
|
name = strmake( "%s/LINGUAS", po_dir );
|
||||||
if (!(f = fopen( name, "r" ))) return;
|
if (!(f = fopen( name, "r" )))
|
||||||
|
{
|
||||||
|
free( name );
|
||||||
|
return;
|
||||||
|
}
|
||||||
free( name );
|
free( name );
|
||||||
while (fgets( buffer, sizeof(buffer), f ))
|
while (fgets( buffer, sizeof(buffer), f ))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue