Commit d73dd575 authored by Thomas Markwalder's avatar Thomas Markwalder

[master] Fixed minor Coverity issues

    Merges in #30,!16
parent ea37c514
......@@ -139,6 +139,10 @@ by Eric Young (eay@cryptsoft.com).
Thanks to Brett Neumeier for bringing the matter to our attention.
[ISC-Bugs #15,!10 git c138f38bd00ceca4e1e51a4db7542a15ef79babd]
- Fixed potential memory leaks in parser error message generation
spotted by Coverity, CIDs: 1448191, 1448193, 1448194, 1448195
[Gitlab #30,!16 git TBD]
Changes since 4.4.0 (New Features)
- none
Changes since 4.4.0 (Bug Fixes)
......
......@@ -3578,6 +3578,11 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
if (token != EQUAL) {
parse_warn (cfile,
"expecting '=' in set statement.");
binding_value_dereference(&nv, MDL);
if (newbinding) {
dfree(binding->name, MDL);
dfree(binding, MDL);
}
goto badset;
}
}
......@@ -3585,6 +3590,10 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
if (!parse_binding_value(cfile, nv)) {
binding_value_dereference(&nv, MDL);
lease_dereference(&lease, MDL);
if (newbinding) {
dfree(binding->name, MDL);
dfree(binding, MDL);
}
return 0;
}
......@@ -4762,6 +4771,7 @@ parse_ia_na_declaration(struct parse *cfile) {
if (token != LBRACE) {
parse_warn(cfile, "corrupt lease file; expecting left brace");
skip_to_semi(cfile);
ia_dereference(&ia, MDL);
return;
}
......@@ -5209,6 +5219,7 @@ parse_ia_ta_declaration(struct parse *cfile) {
if (token != LBRACE) {
parse_warn(cfile, "corrupt lease file; expecting left brace");
skip_to_semi(cfile);
ia_dereference(&ia, MDL);
return;
}
......@@ -5646,6 +5657,7 @@ parse_ia_pd_declaration(struct parse *cfile) {
if (token != LBRACE) {
parse_warn(cfile, "corrupt lease file; expecting left brace");
skip_to_semi(cfile);
ia_dereference(&ia, MDL);
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment