Fix: dereference after NULL check
[lttng-tools.git] / src / bin / lttng-sessiond / ust-app.c
index e36238182d8f04e078d440dce4d3bee94b9c5360..dfc4599be858315b3a2b25956b0daa49e9d24bd2 100644 (file)
@@ -2404,7 +2404,7 @@ static int create_ust_app_channel(struct ust_app_session *ua_sess,
        if (ua_chan == NULL) {
                /* Only malloc can fail here */
                ret = -ENOMEM;
-               goto error;
+               goto error_alloc;
        }
        shadow_copy_channel(ua_chan, uchan);
 
@@ -2432,6 +2432,7 @@ end:
 
 error:
        delete_ust_app_channel(ua_chan->is_sent ? app->sock : -1, ua_chan, app);
+error_alloc:
        return ret;
 }
 
@@ -2527,8 +2528,8 @@ static int create_ust_app_metadata(struct ust_app_session *ua_sess,
                metadata->attr.overwrite = DEFAULT_CHANNEL_OVERWRITE;
                metadata->attr.subbuf_size = default_get_metadata_subbuf_size();
                metadata->attr.num_subbuf = DEFAULT_METADATA_SUBBUF_NUM;
-               metadata->attr.switch_timer_interval = DEFAULT_UST_CHANNEL_SWITCH_TIMER;
-               metadata->attr.read_timer_interval = DEFAULT_UST_CHANNEL_READ_TIMER;
+               metadata->attr.switch_timer_interval = DEFAULT_METADATA_SWITCH_TIMER;
+               metadata->attr.read_timer_interval = DEFAULT_METADATA_READ_TIMER;
                metadata->attr.output = LTTNG_UST_MMAP;
                metadata->attr.type = LTTNG_UST_CHAN_METADATA;
        } else {
This page took 0.024387 seconds and 4 git commands to generate.