From c2bb949a46613bc8115db4e62668fe23594ca4fa Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sun, 15 Mar 2015 10:53:43 +0100 Subject: [PATCH] g_eli_ctl_onetime(): Fix NULL pointer dereference ... caused by the previous commit. Current language: auto; currently minimal (kgdb) f 10 270 if (*trim) (kgdb) p trim $1 = (int *) 0x0 --- sys/geom/eli/g_eli_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/eli/g_eli_ctl.c b/sys/geom/eli/g_eli_ctl.c index 42f0daf..6834f43 100644 --- a/sys/geom/eli/g_eli_ctl.c +++ b/sys/geom/eli/g_eli_ctl.c @@ -257,7 +257,7 @@ g_eli_ctl_onetime(struct gctl_req *req, struct g_class *mp) return; } trim = gctl_get_paraml(req, "trim", sizeof(*trim)); - if (detach == NULL) { + if (trim == NULL) { gctl_error(req, "No '%s' argument.", "trim"); return; } -- 2.3.0