add fast path for normal mutexes back to pthread_mutex_lock
[oweals/musl.git] / src / process / posix_spawn_file_actions_destroy.c
index c2501ddfaf60a6941812b09e702c6c06f4bb7298..3251babb556cae7cd6c81986b286ee7705e8285b 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;
 }