redirect: Avoid use of uninitialised LsiRedirectOperation

While admittedly there is no case of us using any invalid LsiRedirectOperation,
there exists the future possibility for invalid inserts into the op table
when we encounter an unhandled op type.

Knock it on the head and bail early, as appropriate.

Signed-off-by: Ikey Doherty <ikey.doherty@intel.com>
This commit is contained in:
Ikey Doherty
2019-01-08 10:53:02 +00:00
parent ffe7825f62
commit 89e7b7cfbb
+1 -1
View File
@@ -64,7 +64,7 @@ void lsi_redirect_profile_insert_rule(LsiRedirectProfile *self, LsiRedirect *red
default:
lsi_log_error("Attempted insert of unknown rule into '%s'", self->name);
lsi_redirect_free(redirect);
break;
return;
}
/* Set head or prepend the rule */