qcacld-3.0: Avoid memory leak

Memory is created for the mlme legacy pointer during the create
of the mlme legacy priv object. This allocated memory doesn't get
free when an error condition which leads to device crash.

To avoid this problem memory should be freed before returning from
the error condition.

Change-Id: I8aaaf7bf17cf38f70135e5ff00db429c34aff2d8
CRs-Fixed: 2803896
1 file changed