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

Friendly Automation asteriskteam at digium.com
Mon Sep 23 14:07:29 CDT 2019


Friendly Automation has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/12910 )

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
  Friendly Automation: 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/+/12910
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I3d0031d03c8356e4808f00cdf2d5428712575883
Gerrit-Change-Number: 12910
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/0e8d674e/attachment-0001.html>


More information about the asterisk-code-review mailing list