zone-load: fixed crash when loading non-existing zone file
- refactored the zone-loader a bit, as reading from zone file creates only contents and the zone is created separately - refactored zone contents creating function, as it is always used in a way where an apex node is created and inserted into contents - crash occured because created zone bound configuration and if parsing failed, the configuration was freed with the zone and also with the caller
Showing
- src/knot/ctl/knotc_main.c 4 additions, 18 deletionssrc/knot/ctl/knotc_main.c
- src/knot/server/server.c 1 addition, 1 deletionsrc/knot/server/server.c
- src/knot/server/zone-load.c 35 additions, 51 deletionssrc/knot/server/zone-load.c
- src/knot/server/zone-load.h 10 additions, 1 deletionsrc/knot/server/zone-load.h
- src/knot/updates/xfr-in.c 4 additions, 11 deletionssrc/knot/updates/xfr-in.c
- src/knot/zone/zone-contents.c 14 additions, 22 deletionssrc/knot/zone/zone-contents.c
- src/knot/zone/zone-contents.h 1 addition, 2 deletionssrc/knot/zone/zone-contents.h
- src/knot/zone/zone-load.c 63 additions, 71 deletionssrc/knot/zone/zone-load.c
- src/knot/zone/zone-load.h 9 additions, 9 deletionssrc/knot/zone/zone-load.h
- src/knot/zone/zone.c 0 additions, 21 deletionssrc/knot/zone/zone.c
- src/knot/zone/zone.h 0 additions, 9 deletionssrc/knot/zone/zone.h
- tests/process_query.c 1 addition, 1 deletiontests/process_query.c
Loading
Please register or sign in to comment