Fix: passing null to closedir() on error
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 29 Aug 2018 21:28:36 +0000 (17:28 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 13 Sep 2018 21:30:31 +0000 (17:30 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-crash/lttng-crash.c

index ba28af9afa9003f2f92decb5ade2275634b38a02..16b833dbcb6b4c7e0adb56edb084ac1247421f5a 100644 (file)
@@ -1079,7 +1079,7 @@ int delete_dir_recursive(const char *path)
        if (!dir) {
                PERROR("Cannot open '%s' path", path);
                ret = -errno;
-               goto end;
+               goto end_no_closedir;
        }
 
        path_len = strlen(path);
@@ -1162,6 +1162,7 @@ end:
        if (closeret) {
                PERROR("closedir");
        }
+end_no_closedir:
        return ret;
 }
 
This page took 0.025586 seconds and 4 git commands to generate.