mohabouje / WinToast

WinToast is a lightly library written in C++ which brings a complete integration of the modern toast notifications of Windows 8 & Windows 10. Toast notifications allows your app to inform the users about relevant information and timely events that they should see and take action upon inside your app, such as a new instant message, a new friend request, breaking news, or a calendar event.
MIT License
688 stars 127 forks source link

createShellLinkHelper CoTaskMemFree on stack variables #6

Closed kainjow closed 6 years ago

kainjow commented 6 years ago

In createShellLinkHelper() exePath and slPath are stack variables, yet CoTaskMemFree() is being called on both. Isn't this incorrect?

I ask because I've received a crash report (intermittent) in initialize() -> createShellHelper() line 373.

kainjow commented 6 years ago

Here's the screenshot:

crash

I'm about 99% sure this code is incorrect (since CoTaskMemFree "Frees a block of task memory previously allocated through a call to the CoTaskMemAlloc or CoTaskMemRealloc function.") but just want to make sure I'm not missing something.

kainjow commented 6 years ago

Fixed in #7.