From cd7b0f36f72298777bff8e5b57a860603cc909f5 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Fri, 16 Nov 2018 14:42:22 +1100 Subject: [PATCH] cleanup allocated memory on error (cherry picked from commit 4979d5f31fa3de6905421e8e38e3af2543eb57b4) --- contrib/dlz/drivers/dlz_filesystem_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/dlz/drivers/dlz_filesystem_driver.c b/contrib/dlz/drivers/dlz_filesystem_driver.c index c460d98474..60f00956cf 100644 --- a/contrib/dlz/drivers/dlz_filesystem_driver.c +++ b/contrib/dlz/drivers/dlz_filesystem_driver.c @@ -654,7 +654,8 @@ fs_allnodes(const char *zone, void *driverarg, void *dbdata, ISC_LIST_INIT(*dir_list); if (create_path(zone, NULL, NULL, cd, &basepath) != ISC_R_SUCCESS) { - return (ISC_R_NOTFOUND); + result = ISC_R_NOTFOUND; + goto complete_allnds; } /* remove path separator at end of path so stat works properly */