Commit 590e1656 authored by Simon Morlat's avatar Simon Morlat

fix crash during exit() in linphonec due to log written to closed FILE

parent 01710248
......@@ -1601,7 +1601,7 @@ linphonec_proxy_add(LinphoneCore *lc)
*/
if ( enable_register==TRUE )
{
long int expires=0;
int expires=0;
while (1)
{
char *input=linphonec_readline("Specify register expiration time"
......@@ -1613,13 +1613,8 @@ linphonec_proxy_add(LinphoneCore *lc)
return;
}
expires=strtol(input, (char **)NULL, 10);
if ( expires == LONG_MIN || expires == LONG_MAX )
{
linphonec_out("Invalid value: %s\n", strerror(errno));
free(input);
continue;
}
expires=atoi(input);
if (expires==0) expires=600;
linphone_proxy_config_set_expires(cfg, expires);
linphonec_out("Expiration: %d seconds\n", linphone_proxy_config_get_expires (cfg));
......
......@@ -805,6 +805,7 @@ linphonec_finish(int exit_status)
if (mylogfile != NULL && mylogfile != stdout)
{
fclose (mylogfile);
mylogfile=stdout;
}
printf("\n");
exit(exit_status);
......
mediastreamer2 @ 4464c094
Subproject commit 338398a4eee9b44dfeb2c18b735bf42cc2b9e93c
Subproject commit 4464c094410dd4396b3563798031ed50ae90d8c8
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment