summary refs log tree commit diff
path: root/Src/Modules/example.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2017-02-13 16:45:31 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2017-02-13 18:09:34 -0800
commit63f086d167960a27ecdbcb762179e2c2bf8a29f5 (patch)
tree178da0da015c81baf5ac8e8a7c1dfc4697d4fd38 /Src/Modules/example.c
parente720f459759ce8e7812cca9dad140ef188432b40 (diff)
downloadzsh-63f086d167960a27ecdbcb762179e2c2bf8a29f5.tar.gz
zsh-63f086d167960a27ecdbcb762179e2c2bf8a29f5.tar.xz
zsh-63f086d167960a27ecdbcb762179e2c2bf8a29f5.zip
40524: do not free a null array
Diffstat (limited to 'Src/Modules/example.c')
-rw-r--r--Src/Modules/example.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/Modules/example.c b/Src/Modules/example.c
index 45ca2cffa..c80c9e7b2 100644
--- a/Src/Modules/example.c
+++ b/Src/Modules/example.c
@@ -69,7 +69,8 @@ bin_example(char *nam, char **args, Options ops, UNUSED(int func))
     intparam = i;
     zsfree(strparam);
     strparam = ztrdup(*oargs ? *oargs : "");
-    freearray(arrparam);
+    if (arrparam)
+	freearray(arrparam);
     arrparam = zarrdup(oargs);
     return 0;
 }