Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix memory leak and a failed ASSERT under win32 Debug build. A string…

… was being double-strdup'ed, causing delete[] to fail when deleting the copy from the different heap instead of the local one.

Tracking down the assert to dbgheap.c gives the following message:
> a bad pointer has been passed in. It may be totally bogus, or it may have been allocated from another heap. The pointer MUST come from the 'local' heap.
  • Loading branch information...
commit 98a74f45f304f4aaf0fca51d2901a5d2fa086c5c 1 parent 64a0e61
@garbear garbear authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  lib/addons/library.xbmc.addon/libXBMC_addon.cpp
View
3  lib/addons/library.xbmc.addon/libXBMC_addon.cpp
@@ -113,8 +113,7 @@ DLLEXPORT char* XBMC_get_dvd_menu_language(void *hdl, void* cb)
if (cb == NULL)
return "";
- string buffer = ((CB_AddOnLib*)cb)->GetDVDMenuLanguage(((AddonCB*)hdl)->addonData);
- return strdup(buffer.c_str());
+ return ((CB_AddOnLib*)cb)->GetDVDMenuLanguage(((AddonCB*)hdl)->addonData);
}
DLLEXPORT void XBMC_free_string(void* hdl, void* cb, char* str)
Please sign in to comment.
Something went wrong with that request. Please try again.