Browse Source

Fix bad allocation in pubsub.c

Closes 19038.  Bug not in any released Tor.
Nick Mathewson 8 years ago
parent
commit
99c0e1bd5b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/common/pubsub.c

+ 1 - 1
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;