]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Avoid some recursion in the cleanup code for the chanspy datastore
authorRussell Bryant <russell@russellbryant.com>
Wed, 27 Feb 2008 01:15:02 +0000 (01:15 +0000)
committerRussell Bryant <russell@russellbryant.com>
Wed, 27 Feb 2008 01:15:02 +0000 (01:15 +0000)
(closes issue #12076, reported by junky, patched by me)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@104334 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_chanspy.c

index adea928eeecb3a926095fbe6198c469ab47fd736..297bbec97c5d56828200f426a79744d42923dc56 100644 (file)
@@ -409,6 +409,8 @@ static struct chanspy_ds *chanspy_ds_free(struct chanspy_ds *chanspy_ds)
                if ((datastore = ast_channel_datastore_find(chan, &chanspy_ds_info, NULL))) {
                        ast_channel_datastore_remove(chan, datastore);
                        /* chanspy_ds->chan is NULL after this call */
+                       chanspy_ds_destroy(datastore->data);
+                       datastore->data = NULL;
                        ast_channel_datastore_free(datastore);
                }
                ast_channel_unlock(chan);