staging: rtl8723au: free_scanqueue(): Use _rtw_free_network23a()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 9 Jun 2014 13:16:32 +0000 (15:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jun 2014 21:00:20 +0000 (14:00 -0700)
Use _rtw_free_network23() so elements are freed in one place.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/core/rtw_mlme.c

index 71ff753b0d59065213a08827f490f36d580a7da7..7c99c37f3df7dff405d025aec20bcead12a5d5d1 100644 (file)
@@ -831,9 +831,9 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
        phead = get_list_head(scan_queue);
 
        list_for_each_safe(plist, ptemp, phead) {
-               list_del_init(plist);
                pnetwork = container_of(plist, struct wlan_network, list);
-               kfree(pnetwork);
+               pnetwork->fixed = false;
+               _rtw_free_network23a(pmlmepriv, pnetwork);
         }
 
        spin_unlock_bh(&scan_queue->lock);