mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Free config file values on parsing errors.
This time I have a little bit more controversal patches. But I think still useful. They fixes memory leaks that might occur in some cases. Most dnsmasq errors is fatal, so it does not matter. But some are not. Some parts are reloaded on SIGHUP signal, so it might leak more than once. Some example when it changes the failures. Use dhcp-options file with this content: tag:error,vendor:redhat option:ntp-server,1.2.3.4.5 option6:ntp-server,[:::] Is not fatal and dnsmasq will start. On each reload command, it would leak some memory. I validated it using valgrind --leak-check=full dnsmasq -d. This patch fixes it. It introduces something that might be considered constructor and destructor of selected structures.
This commit is contained in:
committed by
Simon Kelley
parent
48d12f14c9
commit
59e470381f
533
src/option.c
533
src/option.c
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user