diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-09-13 09:24:16 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2013-09-13 09:24:16 -0400 |
commit | 50e935e4e546f7eee7622d96ca60c78a1fd1c50d (patch) | |
tree | 703f41d3f4b1742c24716f6f90b6906e73167e83 /litmus | |
parent | f03290dc1fea7eac15fe2e71dab2b29ccf0934b3 (diff) |
Fix litmus_admit_task() error path
Don't try to release slab objects that were never allocated.
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/litmus.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) | |||
376 | 376 | ||
377 | out: | 377 | out: |
378 | if (retval) { | 378 | if (retval) { |
379 | bheap_node_free(tsk_rt(tsk)->heap_node); | 379 | if (tsk_rt(tsk)->heap_node) |
380 | release_heap_free(tsk_rt(tsk)->rel_heap); | 380 | bheap_node_free(tsk_rt(tsk)->heap_node); |
381 | if (tsk_rt(tsk)->rel_heap) | ||
382 | release_heap_free(tsk_rt(tsk)->rel_heap); | ||
381 | } | 383 | } |
382 | return retval; | 384 | return retval; |
383 | } | 385 | } |