about summary refs log tree commit diff
path: root/src/process/posix_spawn_file_actions_destroy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process/posix_spawn_file_actions_destroy.c')
-rw-r--r--src/process/posix_spawn_file_actions_destroy.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/process/posix_spawn_file_actions_destroy.c b/src/process/posix_spawn_file_actions_destroy.c
index c2501ddf..3251babb 100644
--- a/src/process/posix_spawn_file_actions_destroy.c
+++ b/src/process/posix_spawn_file_actions_destroy.c
@@ -1,9 +1,14 @@
 #include <spawn.h>
 #include <stdlib.h>
+#include "fdop.h"
 
 int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *fa)
 {
-	// FIXME
-	free(fa->__actions);
+	struct fdop *op = fa->__actions, *next;
+	while (op) {
+		next = op->next;
+		free(op);
+		op = next;
+	}
 	return 0;
 }