stasis: refcounter.py can incorrectly report skewed objects.
authorCorey Farrell <git@cfware.com>
Fri, 20 Sep 2019 13:29:01 +0000 (09:29 -0400)
committerCorey Farrell <git@cfware.com>
Fri, 20 Sep 2019 13:31:38 +0000 (08:31 -0500)
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

main/stasis.c

index 3623dab..02f6e53 100644 (file)
@@ -514,7 +514,7 @@ static int link_topic_proxy(struct stasis_topic *topic, const char *name, const
        }
 
        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);