prima: Nullify remain_on_chan_ctx after it is freed

remain_on_chan_ctx is made null before the memory is freed.
Moving down the statment once the timer is stopped and destroyed.
And is assigned to NULL.

Change-Id: Ibf2e5b8b4814366fac115b64bed0e9c7c66acfe4
CRs-Fixed: 870028
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index 4ba1f3a..27adc37 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -194,7 +194,6 @@
             pRemainChanCtx->rem_on_chan_request,
             pRemainChanCtx->chan.center_freq,
             pRemainChanCtx->cookie);
-    cfgState->remain_on_chan_ctx = NULL;
     vos_timer_stop(&pRemainChanCtx->hdd_remain_on_chan_timer);
     vos_timer_destroy(&pRemainChanCtx->hdd_remain_on_chan_timer);
     mutex_unlock(&pHddCtx->roc_lock);
@@ -250,6 +249,7 @@
     }
     vos_mem_free( pRemainChanCtx );
     pRemainChanCtx = NULL;
+    cfgState->remain_on_chan_ctx = NULL;
     if (eHAL_STATUS_SUCCESS != status)
         complete(&pAdapter->rem_on_chan_ready_event);
     complete(&pAdapter->cancel_rem_on_chan_var);