ntpd: plug potential leak on error
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 9 Oct 2018 08:36:48 +0000 (10:36 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 9 Oct 2018 08:36:48 +0000 (10:36 +0200)
commitf5c3d7b736b81b0ce936b4aefbb7edbf6cf8bf3a
treea95761950788f88d6de7ce637446ad24060b79b1
parentfda77d50a9d9c242b04f0f303b982fde1f6a3ad7
ntpd: plug potential leak on error

Found by scan-build:

src/ntpd.c:833:5: warning: Potential memory leak
    ERROR("ntpd plugin: ntpd_do_query (REQ_GET_KERNEL) failed with status %i",
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./src/daemon/plugin.h:391:20: note: expanded from macro 'ERROR'
                   ^~~~~~~~~~
1 warning generated.
src/ntpd.c