Skip to content

Commit fd2abea

Browse files
committed
Only dereference 'new_local_port' when it is allocated.
Remove redundant NULL assignment.
1 parent d6d3394 commit fd2abea

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/libnml/nml/nml_srv.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,19 @@ NML_SERVER::NML_SERVER(NML * _nml, int _set_to_master):CMS_SERVER()
5858
if (NULL != new_nml) {
5959
new_local_port = new NML_SERVER_LOCAL_PORT(new_nml);
6060
add_local_port(new_local_port);
61+
new_local_port->local_channel_reused = 1;
6162
}
62-
new_local_port->local_channel_reused = 1;
6363
} else {
6464
new_nml = new NML(_nml, 1, -1);
6565
if (NULL != new_nml) {
6666
new_local_port = new NML_SERVER_LOCAL_PORT(new_nml);
6767
add_local_port(new_local_port);
68+
new_local_port->local_channel_reused = 0;
6869
}
69-
new_local_port->local_channel_reused = 0;
7070
}
7171
} else {
7272
rcs_print_error
7373
("NML_SERVER:(ERROR) ProcessType was REMOTE.\n");
74-
_nml = NULL;
7574
}
7675
} else {
7776
rcs_print_error("NML_SERVER:(ERROR) cms was NULL.\n");

0 commit comments

Comments
 (0)