fix memleak: ustctl free shadow chan on ustctl_unmap_channel()
[lttng-ust.git] / liblttng-ust-ctl / ustctl.c
index 4648bf33202164e7995b1930f741e5afc0b142c1..059a258fbcb4a50c1b951d1977a2d961872fbcce 100644 (file)
@@ -387,6 +387,7 @@ int ustctl_set_filter(int sock, struct lttng_ust_filter_bytecode *bytecode,
        lum.cmd = LTTNG_UST_FILTER;
        lum.u.filter.data_size = bytecode->len;
        lum.u.filter.reloc_offset = bytecode->reloc_offset;
+       lum.u.filter.seqnum = bytecode->seqnum;
 
        ret = ustcomm_send_app_msg(sock, &lum);
        if (ret)
@@ -684,6 +685,7 @@ struct lttng_ust_shm_handle *ustctl_map_channel(struct lttng_ust_object_data *ch
        default:
                ERR("Unknown client type %d", config->client_type);
                channel_destroy(chan, handle, 1);
+               free(handle->shadow_chan);
                return NULL;
        }
        /* Replace the object table pointer. */
@@ -734,6 +736,7 @@ void ustctl_unmap_channel(struct lttng_ust_shm_handle *handle)
        assert(handle);
        chan = shmp(handle, handle->chan);
        channel_destroy(chan, handle, 1);
+       free(handle->shadow_chan);
 }
 
 /*
This page took 0.024136 seconds and 4 git commands to generate.