conntrack: Fix using alg_exp_entry out of scope.
'alg_exp_entry' is allocated on stack memory, but could be used via
'alg_exp' pointer inside 'write_ct_md' function, i.e. outside its scope.
CC: Darrell Ball
Fixes: ("Userspace Datapath: Add ALG infra and FTP.")
@@ -1246,9 +1246,9 @@ process_one(struct conntrack *ct, struct dp_packet *pkt,
}
const struct alg_exp_node *alg_exp = NULL;
+ struct alg_exp_node alg_exp_entry;
if (OVS_UNLIKELY(create_new_conn)) {
- struct alg_exp_node alg_exp_entry;
ct_rwlock_rdlock(&ct->resources_lock);
alg_exp = expectation_lookup(&ct->alg_expectations, &ctx->key,
