summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-08-14 14:55:46 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-08-16 14:41:08 +0800
commit4109b0059599c2e7b44e89d80b953233c2ba575e (patch)
treec233cba884ff4ac2f176eaaba5898b4ebb5093de
parentba40c0ea7bedec01513537fd2dc3e0b75f439929 (diff)
downloadtalos-petitboot-4109b0059599c2e7b44e89d80b953233c2ba575e.tar.gz
talos-petitboot-4109b0059599c2e7b44e89d80b953233c2ba575e.zip
lib/waiter: talloc waiters from waitset context
We can lose a reference to the first waiter allocated, as set->waiters may be NULL. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
-rw-r--r--lib/waiter/waiter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/waiter/waiter.c b/lib/waiter/waiter.c
index 13b0d68..833f63b 100644
--- a/lib/waiter/waiter.c
+++ b/lib/waiter/waiter.c
@@ -66,7 +66,7 @@ static struct waiter *waiter_new(struct waitset *set)
{
struct waiter **waiters, *waiter;
- waiter = talloc(set->waiters, struct waiter);
+ waiter = talloc(set, struct waiter);
if (!waiter)
return NULL;
OpenPOWER on IntegriCloud