aboutsummaryrefslogtreecommitdiff
path: root/src/common/pubsub.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-05-12 09:56:42 -0400
committerNick Mathewson <nickm@torproject.org>2016-05-12 09:56:42 -0400
commit99c0e1bd5b3974c8bf767487e7cf9a9193a3c91a (patch)
treec9c062e05e16a7ab6848854ce8acdf4f6b51e081 /src/common/pubsub.c
parent9e44273a4a22803eff900f6df10f13c7548bdb0d (diff)
downloadtor-99c0e1bd5b3974c8bf767487e7cf9a9193a3c91a.tar.gz
tor-99c0e1bd5b3974c8bf767487e7cf9a9193a3c91a.zip
Fix bad allocation in pubsub.c
Closes 19038. Bug not in any released Tor.
Diffstat (limited to 'src/common/pubsub.c')
-rw-r--r--src/common/pubsub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/pubsub.c b/src/common/pubsub.c
index 98ec3f81cc..b3faf40e00 100644
--- a/src/common/pubsub.c
+++ b/src/common/pubsub.c
@@ -48,7 +48,7 @@ pubsub_subscribe_(pubsub_topic_t *topic,
if (subscribe_flags & SUBSCRIBE_ATSTART) {
tor_assert(topic->n_events_fired == 0);
}
- pubsub_subscriber_t *r = tor_malloc_zero(sizeof(r));
+ pubsub_subscriber_t *r = tor_malloc_zero(sizeof(*r));
r->priority = priority;
r->subscriber_flags = subscribe_flags;
r->fn = fn;