Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c430108 authored by Archana Ramachandran's avatar Archana Ramachandran Committed by Sooraj S
Browse files

prima: Fix NULL pointer dereferencing in p2p TX MGMT

Fix dereferencing channel struct pointer without verifying the
validity.

CRs-Fixed: 1034743
Change-Id: I7a49467c3fdbe85c7255fcce7f135e53658eef63
parent 30235e64
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1454,7 +1454,9 @@ int __wlan_hdd_mgmt_tx( struct wiphy *wiphy, struct net_device *dev,

    //If GO adapter exists and operating on same frequency
    //then we will not request remain on channel
    if (ieee80211_frequency_to_channel(chan->center_freq) == home_ch)
    if (chan &&
        (ieee80211_frequency_to_channel(chan->center_freq) ==
        home_ch))
    {
        /*  if GO exist and is not off channel
         *  wait time should be zero.
@@ -1465,7 +1467,7 @@ int __wlan_hdd_mgmt_tx( struct wiphy *wiphy, struct net_device *dev,
#endif

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
    if( offchan && wait)
    if( offchan && wait && chan)
    {
        int status;
        rem_on_channel_request_type_t req_type = OFF_CHANNEL_ACTION_TX;