Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion local_node.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ usteer_handle_bss_tm_query(struct usteer_local_node *ln, struct blob_attr *msg)
query->dialog_token = blobmsg_get_u8(tb[BSS_TM_QUERY_DIALOG_TOKEN]);

sta_addr = (uint8_t *) ether_aton(blobmsg_get_string(tb[BSS_TM_QUERY_ADDRESS]));
if (!sta_addr)
if (!sta_addr) {
free(query);
return 0;
}

memcpy(query->sta_addr, sta_addr, 6);

Expand Down
2 changes: 1 addition & 1 deletion policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ is_better_candidate(struct sta_info *si_cur, struct sta_info *si_new)
reasons |= (1 << UEV_SELECT_REASON_SIGNAL);

if (has_better_load(current_node, new_node) &&
!has_better_load(current_node, new_node))
!has_better_load(new_node, current_node))
reasons |= (1 << UEV_SELECT_REASON_LOAD);

return reasons;
Expand Down