Tests: abort test on memory allocation failure
[lttng-tools.git] / tests / unit / test_session.c
index 7242edded9879640cddfd2f408168ecf4b87397b..7c925908d326f18443c3e2184a50a8c430abb723 100644 (file)
@@ -16,7 +16,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#define _GNU_SOURCE
 #include <assert.h>
 #include <errno.h>
 #include <stdio.h>
 
 static struct ltt_session_list *session_list;
 
-/* For lttngerr.h */
+/* For error.h */
 int lttng_opt_quiet = 1;
 int lttng_opt_verbose = 0;
+int lttng_opt_mi;
 
 int ust_consumerd32_fd;
 int ust_consumerd64_fd;
@@ -108,8 +108,7 @@ static void empty_session_list(void)
        struct ltt_session *iter, *tmp;
 
        cds_list_for_each_entry_safe(iter, tmp, &session_list->head, list) {
-               cds_list_del(&iter->list);
-               free(iter);
+               session_destroy(iter);
        }
 
        /* Session list must be 0 */
This page took 0.029264 seconds and 4 git commands to generate.