# wm\_lstCreate API is broken

**URL:** <https://forum.sierrawireless.com/t/wm-lstcreate-api-is-broken/3598>\
**Category:** Open AT\
**Created:** [September 1, 2009, 12:25pm UTC](https://forum.sierrawireless.com/t/wm-lstcreate-api-is-broken/3598 "2009-09-01T12:25:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![szalik](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@szalik](https://forum.sierrawireless.com/u/szalik)\
**Post date:** [September 1, 2009, 12:25pm UTC](https://forum.sierrawireless.com/t/wm-lstcreate-api-is-broken/3598/1 "2009-09-01T12:25:21Z")

</div>

Hi,

I was quite surprised when I discovered that the 2nd parameter for wm\_lstCreate - which is a pointer to wm\_lstTable\_t - has to be a global variable. Otherwise, i.e. when it is allocated on the function stack, wm\_lstDeleteItem crashes.

This should be either documented or fixed. All the parameters should be copied by wm\_lstCreate and the API should not require the structure to exist all the time as a global variable.

–  
Piotr

---

<div class="post-metadata">

**Author:** ![szalik](https://avatars.discourse-cdn.com/v4/letter/s/7c8e57/32.png) [@szalik](https://forum.sierrawireless.com/u/szalik)\
**Post date:** [September 1, 2009, 12:33pm UTC](https://forum.sierrawireless.com/t/wm-lstcreate-api-is-broken/3598/2 "2009-09-01T12:33:49Z")

</div>

That is - the wm\_lstTable\_T structure, not the pointer to this structure, has to be a global variable.
