[Asterisk-code-review] stasis: refcounter.py can incorrectly report skewed objects. (...asterisk[17])

Kevin Harwell asteriskteam at digium.com
Mon Sep 23 15:45:52 CDT 2019


Kevin Harwell has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/12909 )

Change subject: stasis: refcounter.py can incorrectly report skewed objects.
......................................................................

stasis: refcounter.py can incorrectly report skewed objects.

It is possible for topic->name to be NULL, this causes the allocation
reference to not be logged.  Use the name variable instead which has
been verified to be a non-empty.

Change-Id: I3d0031d03c8356e4808f00cdf2d5428712575883
---
M main/stasis.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Benjamin Keith Ford: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved; Approved for Submit



diff --git a/main/stasis.c b/main/stasis.c
index 3623dab..02f6e53 100644
--- a/main/stasis.c
+++ b/main/stasis.c
@@ -514,7 +514,7 @@
 	}
 
 	proxy = ao2_t_weakproxy_alloc(
-			sizeof(*proxy) + strlen(name) + 1 + strlen(detail) + 1, NULL, topic->name);
+			sizeof(*proxy) + strlen(name) + 1 + strlen(detail) + 1, NULL, name);
 	if (!proxy) {
 		ao2_unlock(topic_all);
 

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/12909
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 17
Gerrit-Change-Id: I3d0031d03c8356e4808f00cdf2d5428712575883
Gerrit-Change-Number: 12909
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190923/a6794a66/attachment.html>


More information about the asterisk-code-review mailing list