diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 020baf15e02d59f45342a6a069fce8f3ca78fa8b..89972e86c7090ded1f9fef62321d93fc9152ed8f 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -3721,8 +3721,10 @@ int wilc_add_station(struct wilc_vif *vif, struct add_sta_param *sta_param) } result = wilc_enqueue_cmd(&msg); - if (result) + if (result) { netdev_err(vif->ndev, "wilc_mq_send fail\n"); + kfree(add_sta_info->rates); + } return result; } @@ -3805,8 +3807,10 @@ int wilc_edit_station(struct wilc_vif *vif, } result = wilc_enqueue_cmd(&msg); - if (result) + if (result) { netdev_err(vif->ndev, "wilc_mq_send fail\n"); + kfree(add_sta_info->rates); + } return result; }