RDMA/nes: Fix error handling issues

Fix issues found by static code analysis:

(1) Check if cm_node was successfully created for loopback connection.

(2) schedule_nes_timer() does not free up allocated memory after
    encountering an error.  There is a WARN_ON() for this condition.

(3) there is a cm_node->freed flag which is set but not used.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Šī revīzija ir iekļauta:
Faisal Latif
2009-04-08 14:22:20 -07:00
revīziju iesūtīja Roland Dreier
vecāks 7a5efb62f6
revīzija 79fc3d7410
2 mainīti faili ar 6 papildinājumiem un 3 dzēšanām

Parādīt failu

@@ -298,7 +298,6 @@ struct nes_cm_node {
struct nes_vnic *nesvnic;
int apbvt_set;
int accept_pend;
int freed;
struct list_head timer_entry;
struct list_head reset_entry;
struct nes_qp *nesqp;