]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - Assemble.c
Free map to avoid resource leak issues
[thirdparty/mdadm.git] / Assemble.c
index 32e6f6ffd1c82c36f05d1148be0902203ac4d0e7..5a907c14aa4e333613891e69825d45ee3b842b94 100644 (file)
@@ -1851,8 +1851,8 @@ try_again:
        if (rv == 1 && !pre_exist)
                ioctl(mdfd, STOP_ARRAY, NULL);
        free(devices);
-       map_unlock(&map);
 out:
+       map_unlock(&map);
        if (rv == 0) {
                wait_for(chosen_name, mdfd);
                close(mdfd);