From 50e935e4e546f7eee7622d96ca60c78a1fd1c50d Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Fri, 13 Sep 2013 15:24:16 +0200 Subject: Fix litmus_admit_task() error path Don't try to release slab objects that were never allocated. --- litmus/litmus.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'litmus/litmus.c') diff --git a/litmus/litmus.c b/litmus/litmus.c index 10e45b7bbecc..ab0bcac13252 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c @@ -376,8 +376,10 @@ long litmus_admit_task(struct task_struct* tsk) out: if (retval) { - bheap_node_free(tsk_rt(tsk)->heap_node); - release_heap_free(tsk_rt(tsk)->rel_heap); + if (tsk_rt(tsk)->heap_node) + bheap_node_free(tsk_rt(tsk)->heap_node); + if (tsk_rt(tsk)->rel_heap) + release_heap_free(tsk_rt(tsk)->rel_heap); } return retval; } -- cgit v1.2.2