ustctl: do not free object on release_object
[lttng-ust.git] / liblttng-ust-ctl / ustctl.c
index e285a2d24b7debc2159b760981c044e4663b7d24..7cd01771a507c093a34cf9be82e3f07ee98a44f3 100644 (file)
@@ -61,7 +61,6 @@ void ustctl_release_object(int sock, struct lttng_ust_object_data *data)
                ret = ustcomm_send_app_cmd(sock, &lum, &lur);
                assert(!ret);
        }
-       free(data);
 }
 
 /*
@@ -162,6 +161,7 @@ int ustctl_open_metadata(int sock, int session_handle,
 
 error:
        ustctl_release_object(sock, metadata_data);
+       free(metadata_data);
        return -EINVAL;
 }
 
@@ -215,6 +215,7 @@ int ustctl_create_channel(int sock, int session_handle,
 
 error:
        ustctl_release_object(sock, channel_data);
+       free(channel_data);
        return -EINVAL;
 }
 
@@ -266,6 +267,7 @@ int ustctl_create_stream(int sock, struct lttng_ust_object_data *channel_data,
 
 error:
        ustctl_release_object(sock, stream_data);
+       free(stream_data);
        return -EINVAL;
 }
 
This page took 0.023257 seconds and 4 git commands to generate.