core: fix regression in sig context ownership test

This patch fixes a problem similar to issue #2065 but for the freeing of
signal contexts.
This commit is contained in:
Norman Feske 2016-08-19 19:03:28 +02:00 committed by Christian Helmuth
parent 8d1cf08b1a
commit a845bdafeb

View File

@ -75,18 +75,22 @@ class Genode::Signal_broker
void free_context(Signal_context_capability context_cap)
{
Signal_context_component *context;
Signal_context_component *context = nullptr;
_context_ep.apply(context_cap, [&] (Signal_context_component *c) {
context = c;
if (!context) {
if (!c) {
warning("specified signal-context capability has wrong type");
return;
}
context = c;
_context_ep.dissolve(context);
});
destroy(&_contexts_slab, context);
if (context)
destroy(&_contexts_slab, context);
}
void submit(Signal_context_capability cap, unsigned cnt)