Fix crash when no netname is specified.

This commit is contained in:
Guus Sliepen 2012-07-21 15:51:15 +02:00
parent 7303b512b0
commit ed8ce60845
2 changed files with 2 additions and 2 deletions

View file

@ -192,7 +192,7 @@ static bool parse_options(int argc, char **argv) {
/* netname "." is special: a "top-level name" */
if(!strcmp(netname, ".")) {
if(netname && !strcmp(netname, ".")) {
free(netname);
netname = NULL;
}

View file

@ -231,7 +231,7 @@ static bool parse_options(int argc, char **argv) {
/* netname "." is special: a "top-level name" */
if(!strcmp(netname, ".")) {
if(netname && !strcmp(netname, ".")) {
free(netname);
netname = NULL;
}