Fix crash when no netname is specified.
This commit is contained in:
parent
7303b512b0
commit
ed8ce60845
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue