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.9.11~34 X-Git-Url: http://git.liburcu.org/?p=lttng-tools.git;a=commitdiff_plain;h=31ac82b01761f164f99dd8c0c340439ebbc5dde6 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 ba28af9af..16b833dbc 100644 --- a/src/bin/lttng-crash/lttng-crash.c +++ b/src/bin/lttng-crash/lttng-crash.c @@ -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; }