[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Fix double-free of torrc_fname
Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv25716/src/or
Modified Files:
config.c
Log Message:
Fix double-free of torrc_fname
Index: config.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/config.c,v
retrieving revision 1.490
retrieving revision 1.491
diff -u -p -d -r1.490 -r1.491
--- config.c 11 Jan 2006 19:43:14 -0000 1.490
+++ config.c 11 Jan 2006 20:01:47 -0000 1.491
@@ -2541,10 +2541,10 @@ options_init_from_torrc(int argc, char *
log(LOG_NOTICE, LD_CONFIG, "Configuration file \"%s\" not present, "
"using reasonable defaults.", fname);
tor_free(fname); /* sets fname to NULL */
+ torrc_fname = NULL;
} else {
log(LOG_WARN, LD_CONFIG,
"Unable to open configuration file \"%s\".", fname);
- tor_free(fname);
goto err;
}
} else { /* it opened successfully. use it. */
@@ -2578,6 +2578,7 @@ options_init_from_torrc(int argc, char *
return 0;
err:
tor_free(fname);
+ torrc_fname = NULL;
config_free(&options_format, newoptions);
return -1;
}