From: Jérémie Galarneau Date: Wed, 29 Aug 2018 21:28:36 +0000 (-0400) Subject: Fix: passing null to closedir() on error X-Git-Tag: v2.11.0-rc1~29 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=ef6fc488ca5672ccd46efac9de9db0cfd24bc810 Fix: passing null to closedir() on error Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-crash/lttng-crash.c b/src/bin/lttng-crash/lttng-crash.c index 53de81bd4..298ed71a4 100644 --- a/src/bin/lttng-crash/lttng-crash.c +++ b/src/bin/lttng-crash/lttng-crash.c @@ -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; }