summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/process/posix_spawn_file_actions_destroy.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/process/posix_spawn_file_actions_destroy.c')
-rw-r--r--libc-top-half/musl/src/process/posix_spawn_file_actions_destroy.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/process/posix_spawn_file_actions_destroy.c b/libc-top-half/musl/src/process/posix_spawn_file_actions_destroy.c
new file mode 100644
index 0000000..3251bab
--- /dev/null
+++ b/libc-top-half/musl/src/process/posix_spawn_file_actions_destroy.c
@@ -0,0 +1,14 @@
+#include <spawn.h>
+#include <stdlib.h>
+#include "fdop.h"
+
+int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *fa)
+{
+ struct fdop *op = fa->__actions, *next;
+ while (op) {
+ next = op->next;
+ free(op);
+ op = next;
+ }
+ return 0;
+}