mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 22:35:15 +00:00
ovsdb-server: Do not use filename after free.
Scanhub reported the following splat:
3. ovsdb/ovsdb-server.c:505:5:
freed_arg: "shash_replace_nocopy" frees "filename".
6. ovsdb/ovsdb-server.c:507:9:
pass_freed_arg: Passing freed pointer "filename" as an argument to
"vlog".
In all code paths with a duplicate configuration, OVSDB would print a
warning log message using a freed pointer. Now, the original option is
used.
Fixes: e76f847209
("ovsdb-server: Database config isolation.")
Reported-at: https://issues.redhat.com/browse/FDP-1118
Signed-off-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
3392e43751
commit
cae90a3d77
@@ -504,7 +504,7 @@ add_database_config(struct shash *db_conf, const char *opt,
|
||||
|
||||
conf = shash_replace_nocopy(db_conf, filename, conf);
|
||||
if (conf) {
|
||||
VLOG_WARN("Duplicate database configuration: %s", filename);
|
||||
VLOG_WARN("Duplicate database configuration: %s", opt);
|
||||
db_config_destroy(conf);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user