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

Corey Farrell asteriskteam at digium.com
Fri Sep 20 08:30:07 CDT 2019


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/12908


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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/08/12908/1

diff --git a/main/stasis.c b/main/stasis.c
index 77b01a7..1947481 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/+/12908
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I3d0031d03c8356e4808f00cdf2d5428712575883
Gerrit-Change-Number: 12908
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190920/692dd4c0/attachment-0001.html>


More information about the asterisk-code-review mailing list