From: Mark Andrews Date: Fri, 16 Nov 2018 03:42:22 +0000 (+1100) Subject: cleanup allocated memory on error X-Git-Tag: v9.11.6rc1~115^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=cd7b0f36f72298777bff8e5b57a860603cc909f5;p=thirdparty%2Fbind9.git cleanup allocated memory on error (cherry picked from commit 4979d5f31fa3de6905421e8e38e3af2543eb57b4) --- diff --git a/contrib/dlz/drivers/dlz_filesystem_driver.c b/contrib/dlz/drivers/dlz_filesystem_driver.c index c460d984747..60f00956cf8 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 */