about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-03-10 17:55:37 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-03-10 17:55:37 +0000
commit43d480057b2255d4fc82cc4eded038bcea0b5cb6 (patch)
treeb47bf1f7c0a780f921d8b01c3b0902ea3b37dc5a /Src
parent7208c4024ea188e904b2aa28a79c6959e9b04a6e (diff)
downloadzsh-43d480057b2255d4fc82cc4eded038bcea0b5cb6.tar.gz
zsh-43d480057b2255d4fc82cc4eded038bcea0b5cb6.tar.xz
zsh-43d480057b2255d4fc82cc4eded038bcea0b5cb6.zip
20959: fix crash unloading zsh/parameter and test the fix
Diffstat (limited to 'Src')
-rw-r--r--Src/Modules/parameter.c2
-rw-r--r--Src/params.c7
2 files changed, 7 insertions, 2 deletions
diff --git a/Src/Modules/parameter.c b/Src/Modules/parameter.c
index 966b26e6f..faa18a92d 100644
--- a/Src/Modules/parameter.c
+++ b/Src/Modules/parameter.c
@@ -1817,7 +1817,7 @@ struct pardef {
  * in a compile-time initialiser, so we use this instead.
  */
 static const struct gsu_hash pmnullsethash_gsu =
-{ hashgetfn, nullsethashfn, NULL };
+{ hashgetfn, nullsethashfn, nullunsetfn };
 static const struct gsu_hash pmcommands_gsu =
 { hashgetfn, setpmcommands, stdunsetfn };
 static const struct gsu_hash pmfunctions_gsu =
diff --git a/Src/params.c b/Src/params.c
index 5563e3acb..a233df90d 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -147,7 +147,7 @@ mod_export const struct gsu_hash stdhash_gsu =
 { hashgetfn, hashsetfn, stdunsetfn };
 /**/
 mod_export const struct gsu_hash nullsethash_gsu =
-{ hashgetfn, nullsethashfn, NULL };
+{ hashgetfn, nullsethashfn, nullunsetfn };
 
 
 /* Non standard methods (not exported) */
@@ -2604,6 +2604,11 @@ void
 nullintsetfn(UNUSED(Param pm), UNUSED(zlong x))
 {}
 
+/**/
+mod_export void
+nullunsetfn(UNUSED(Param pm), UNUSED(int exp))
+{}
+
 
 /* Function to get value of generic special integer *
  * parameter.  data is pointer to global variable   *