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, 30 Aug 2018 16:49:44 +0000 (12:49 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-crash/lttng-crash.c

index 53de81bd46b640bb77862d6af48a472217844310..298ed71a43c2b1b47053156f624aa50b39fd0519 100644 (file)
@@ -1087,7 +1087,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);
@@ -1170,6 +1170,7 @@ end:
        if (closeret) {
                PERROR("closedir");
        }
+end_no_closedir:
        return ret;
 }
 
This page took 0.025431 seconds and 4 git commands to generate.