use vfork if possible in posix_spawn
[musl] / src / process / posix_spawn_file_actions_destroy.c
index c2501dd..3251bab 100644 (file)
@@ -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;
 }