jail: make sure jailed process is terminated
[project/procd.git] / hotplug-dispatch.c
index cfba7d19b745725bbf0e81eadd9639055e4b45c7..f1ece3833f235d59b321d6d9bd89ea3ef621fcd9 100644 (file)
@@ -298,7 +298,7 @@ static int hotplug_call(struct ubus_context *ctx, struct ubus_object *obj,
 
        /* glob'ing for hotplug scripts */
        if (asprintf(&globstr, "%s/%s/*", HOTPLUG_BASEDIR, subsys) == -1) {
-               env_free(envp);
+               hotplug_free(pc);
                return UBUS_STATUS_UNKNOWN_ERROR;
        }