Fix: notification test: resources leak and return handling
[lttng-tools.git] / tests / regression / tools / notification / notification.c
index f69e884ae5435484265bed5cbfe767ef03e20991..5de09e2016e1ed33947780d11ab344d78fd76780 100644 (file)
@@ -68,6 +68,9 @@ int write_pipe(const char *path, uint8_t data)
        ret = write(fd, &data , sizeof(data));
        if (ret < 1) {
                perror("Named pipe write failed");
+               if (close(fd)) {
+                       perror("Named pipe close failed");
+               }
                ret = -1;
                goto end;
        }
@@ -563,6 +566,7 @@ end:
        lttng_trigger_destroy(trigger);
        lttng_action_destroy(action);
        lttng_condition_destroy(low_condition);
+       lttng_condition_destroy(high_condition);
        lttng_condition_destroy(dummy_invalid_condition);
        lttng_condition_destroy(dummy_condition);
 }
This page took 0.024847 seconds and 5 git commands to generate.