# Mismatched new\[\] / delete in asiolist.cpp

**URL:** <https://forums.steinberg.net/t/mismatched-new-delete-in-asiolist-cpp/1020595>\
**Category:** ASIO\
**Created:** [January 12, 2026, 12:54pm UTC](https://forums.steinberg.net/t/mismatched-new-delete-in-asiolist-cpp/1020595 "2026-01-12T12:54:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lorcan](https://dub1.discourse-cdn.com/steinberg/user_avatar/forums.steinberg.net/lorcan/32/72547_2.png) [@Lorcan](https://forums.steinberg.net/u/Lorcan)\
**Post date:** [January 12, 2026, 12:54pm UTC](https://forums.steinberg.net/t/mismatched-new-delete-in-asiolist-cpp/1020595/1 "2026-01-12T12:54:36Z")

</div>

Hi,

While analyzing one of our applications using Adress Sanitizer, I found a potentially serious bug in `host/pc/asiolist.cpp`:

```cpp
static LPASIODRVSTRUCT newDrvStruct (HKEY hkey,char *keyname,int drvID,LPASIODRVSTRUCT lpdrv)
{
  // ...
  lpdrv = new ASIODRVSTRUCT[1]; // L.84
  // ...
}

static void deleteDrvStruct (LPASIODRVSTRUCT lpdrv)
{
  // ...
  delete lpdrv; // L.120 - BUG: should be 'delete[] lpdrv';
  // ...
}

```

Can this be fixed in the next release ?

Thanks,  
Lorcan
