summaryrefslogtreecommitdiffstats
path: root/src/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/plugin.c b/src/plugin.c
index aecc12f..28ddc93 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -1201,18 +1201,14 @@ key_free(struct ulogd_key *key)
void
key_reset(struct ulogd_key *key)
{
- enum ulogd_ktype type;
-
if (!(key->flags & ULOGD_RETF_VALID))
return;
if (key->flags & ULOGD_RETF_FREE)
key_free(key);
- type = key->val.type;
- memset(&key->val, 0, sizeof(key->val));
- key->val.type = type;
-
+ /* use in6, because this happens to be the largest type */
+ memset(&key->val.in6, 0, sizeof(key->val.in6));
key->flags &= ~ULOGD_RETF_VALID;
}