diff options
author | Matt Jordan <mjordan@digium.com> | 2015-09-05 18:48:26 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2015-09-05 18:48:26 -0500 |
commit | a79527ca64bce74ac66b8a4de43d82b2e9e7a07c (patch) | |
tree | b6de70a1a8e2f89171e7d9258f89716d79bd4dee | |
parent | b16c7ef0ed969c53accbf560234156eabe7b84e1 (diff) | |
parent | 7691035312ee649b4d949cace139eddb6e6e49b6 (diff) |
Merge "endpoint snapshot: avoid second cleanup on alloc failure"
-rw-r--r-- | main/endpoints.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/main/endpoints.c b/main/endpoints.c index df9d289c7..21326561c 100644 --- a/main/endpoints.c +++ b/main/endpoints.c @@ -464,7 +464,7 @@ static void endpoint_snapshot_dtor(void *obj) struct ast_endpoint_snapshot *ast_endpoint_snapshot_create( struct ast_endpoint *endpoint) { - RAII_VAR(struct ast_endpoint_snapshot *, snapshot, NULL, ao2_cleanup); + struct ast_endpoint_snapshot *snapshot; int channel_count; struct ao2_iterator i; void *obj; @@ -500,7 +500,6 @@ struct ast_endpoint_snapshot *ast_endpoint_snapshot_create( } ao2_iterator_destroy(&i); - ao2_ref(snapshot, +1); return snapshot; } |