about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2023-03-05 13:26:57 -0800
committerBart Schaefer <schaefer@zsh.org>2023-03-05 13:26:57 -0800
commit806d096b0e7a64bf9712be1cb8159a1ef5b4bf81 (patch)
treee36f9028c150e3963fc6633f4ccbe5a1f21ff717 /Src
parent86a5278f9f5ab516ff2b099d64af2d5567983b5a (diff)
downloadzsh-806d096b0e7a64bf9712be1cb8159a1ef5b4bf81.tar.gz
zsh-806d096b0e7a64bf9712be1cb8159a1ef5b4bf81.tar.xz
zsh-806d096b0e7a64bf9712be1cb8159a1ef5b4bf81.zip
unposted: fix memory leak flagged by coverity
Diffstat (limited to 'Src')
-rw-r--r--Src/Modules/param_private.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Src/Modules/param_private.c b/Src/Modules/param_private.c
index 70f36ceb1..e43f0edb4 100644
--- a/Src/Modules/param_private.c
+++ b/Src/Modules/param_private.c
@@ -122,6 +122,7 @@ makeprivate(HashNode hn, UNUSED(int flags))
 	    break;
 	default:
 	    makeprivate_error = 1;
+	    zfree(gsu, sizeof(struct gsu_closure));
 	    break;
 	}
 	/* PM_HIDE so new parameters in deeper scopes do not shadow */