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.10.6~42 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a0e4ba18a275734e0934ba4d8d598bbcec7d52bb;p=lttng-tools.git 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; }