Skip to content

Commit

Permalink
Merge pull request #207 from flaviojs/fix-unchecked-result-vm_slot_tr…
Browse files Browse the repository at this point in the history
…anslate_port_id

Fix unchecked result in vm_slot_translate_port_id.
  • Loading branch information
grossmj authored Mar 30, 2024
2 parents e7bca8c + 5008631 commit 58cf81c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/cisco_card.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,11 @@ vm_slot_translate_port_id(vm_instance_t *vm,u_int slot_id,u_int port_id,
struct cisco_card **tmp;
u_int real_port_id = 0;

vm_slot_get_info(vm,slot_id,port_id,&tmp,&real_port_id);
if (vm_slot_get_info(vm,slot_id,port_id,&tmp,&real_port_id) == -1) {
*rc = NULL;
return(port_id);
}

*rc = *tmp;
return(real_port_id);
}
Expand Down

0 comments on commit 58cf81c

Please sign in to comment.