From: Mathieu Desnoyers Date: Tue, 2 Jul 2013 20:20:33 +0000 (-0400) Subject: Fix: UST per-UID channels persist across application teardown X-Git-Tag: v2.3.0-rc1~81 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=c83357063c834832bca9fcea0fa9faf093cb7d46 Fix: UST per-UID channels persist across application teardown Fixes #582 Signed-off-by: Mathieu Desnoyers --- diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c index 2d7a81f1a..c329650c9 100644 --- a/src/bin/lttng-sessiond/ust-app.c +++ b/src/bin/lttng-sessiond/ust-app.c @@ -377,10 +377,12 @@ void delete_ust_app_channel(int sock, struct ust_app_channel *ua_chan, delete_ust_app_event(sock, ua_event); } - /* Wipe and free registry from session registry. */ - registry = get_session_registry(ua_chan->session); - if (registry) { - ust_registry_channel_del_free(registry, ua_chan->key); + if (ua_chan->session->buffer_type == LTTNG_BUFFER_PER_PID) { + /* Wipe and free registry from session registry. */ + registry = get_session_registry(ua_chan->session); + if (registry) { + ust_registry_channel_del_free(registry, ua_chan->key); + } } if (ua_chan->obj != NULL) {