Handle aliases properly when discovering that an object has been deleted.
1.1 --- a/siplib/objmap.c Thu Dec 22 09:17:13 2011 +0000
1.2 +++ b/siplib/objmap.c Mon Jan 30 12:20:14 2012 +0000
1.3 @@ -264,9 +264,16 @@
1.4 {
1.5 sipSimpleWrapper *next = sw->next;
1.6
1.7 - /* We are removing it from the map here. */
1.8 - sipSetNotInMap(sw);
1.9 - sip_api_common_dtor(sw);
1.10 + if (sipIsAlias(sw))
1.11 + {
1.12 + sip_api_free(sw);
1.13 + }
1.14 + else
1.15 + {
1.16 + /* We are removing it from the map here. */
1.17 + sipSetNotInMap(sw);
1.18 + sip_api_common_dtor(sw);
1.19 + }
1.20
1.21 sw = next;
1.22 }