Fix: liblttng-ctl: leak of tracker handle in lttng_[un]track_pid
[lttng-tools.git] / src / lib / lttng-ctl / tracker.c
index 3f852fe72bcca794ba858cf978e303339be0087b..4f720ead80a5f1e8e72aea72c17833f680848c6b 100644 (file)
@@ -574,6 +574,7 @@ int lttng_track_pid(struct lttng_handle *handle, int pid)
                                                        (pid_t) pid);
        ret_code = handle_status_to_error_code(handle_status);
 end:
+       lttng_process_attr_tracker_handle_destroy(tracker_handle);
        return ret_code == LTTNG_OK ? 0 : -ret_code;
 }
 
@@ -637,6 +638,7 @@ int lttng_untrack_pid(struct lttng_handle *handle, int pid)
                ret_code = LTTNG_ERR_PID_NOT_TRACKED;
        }
 end:
+       lttng_process_attr_tracker_handle_destroy(tracker_handle);
        return ret_code == LTTNG_OK ? 0 : -ret_code;
 }
 
This page took 0.031411 seconds and 4 git commands to generate.