]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix potential leak (#4471)
authorJorge Pereira <jpereira@users.noreply.github.com>
Thu, 28 Apr 2022 00:37:23 +0000 (21:37 -0300)
committerGitHub <noreply@github.com>
Thu, 28 Apr 2022 00:37:23 +0000 (19:37 -0500)
src/lib/util/file.c

index 80e9ac7156f25cc2f7723ad5003ff381887ec8da..be45dd36b1726fd74b36f9159fee68a57386bf90 100644 (file)
@@ -236,6 +236,8 @@ char *fr_realpath(TALLOC_CTX *ctx, char const *path, ssize_t len)
                return NULL;
        }
 
+       talloc_free(tmp_path);
+
        talloc_abs_path = talloc_strdup(ctx, abs_path);
        free(abs_path);
        if (!talloc_abs_path) {