Skip to content

Commit 93f601c

Browse files
Tizen.Network.WiFi: Fix to use Marshal.FreeHGlobal instead of Interop.Libc.Free (#7282)
The allocation in the native function call is called from libgwpasan and free is called from glibc, and it causes crash on ASAN environment. To resolve this issue, Marshal.FreeHGlobal() is used instead of Interop.Libc.Free(). Signed-off-by: MyoungJune Park <renov.park@samsung.com>
1 parent 842af48 commit 93f601c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiManagerImpl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ internal string TDLSConnectedPeer
720720
else
721721
{
722722
_tdlsMacAddress = Marshal.PtrToStringAnsi(strPtr);
723-
Interop.Libc.Free(strPtr);
723+
Marshal.FreeHGlobal(strPtr);
724724
}
725725

726726
Log.Info(Globals.LogTag, "Tdls Mac address: " + _tdlsMacAddress);

0 commit comments

Comments
 (0)