[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Fix bad allocation in pubsub.c
commit 99c0e1bd5b3974c8bf767487e7cf9a9193a3c91a
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Thu May 12 09:56:42 2016 -0400
Fix bad allocation in pubsub.c
Closes 19038. Bug not in any released Tor.
---
src/common/pubsub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/pubsub.c b/src/common/pubsub.c
index 98ec3f8..b3faf40 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;
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits