ITS#10155 manage option values more carefully

This commit is contained in:
Ondřej Kuzník 2024-10-22 13:59:20 +01:00 committed by Quanah Gibson-Mount
parent d143f7a2dc
commit e29105597a

View file

@ -894,7 +894,7 @@ handle_private_option( int i )
break;
case 'F': /* uri prefix */
if( urlpre ) free( urlpre );
urlpre = optarg;
urlpre = strdup( optarg );
break;
case 'l': /* time limit */
if ( strcasecmp( optarg, "none" ) == 0 ) {
@ -945,7 +945,7 @@ handle_private_option( int i )
break;
case 'T': /* tmpdir */
if( tmpdir ) free( tmpdir );
tmpdir = optarg;
tmpdir = strdup( optarg );
break;
case 'u': /* include UFN */
++includeufn;
@ -1660,6 +1660,9 @@ getNextPage:
free( def_urlpre );
free( urlpre );
}
if ( tmpdir && tmpdir != def_tmpdir ) {
free( tmpdir );
}
if ( c ) {
for ( ; save_nctrls-- > 0; ) {