resource leak in dlz_filesystem_driver.c
646
647 /* allocate memory for list */
1. alloc_fn: Storage is returned from allocation function isc__mem_get. [Note: The source code implementation of the function has been overridden by a user model.]
2. var_assign: Assigning: dir_list = storage returned from isc__mem_get(named_g_mctx, 16UL, "../../contrib/dlz/drivers/dlz_filesystem_driver.c", 648U).
648 dir_list = isc_mem_get(named_g_mctx, sizeof(dlist_t));
3. Condition dir_list == NULL, taking false branch.
649 if (dir_list == NULL) {
650 result = ISC_R_NOTFOUND;
651 goto complete_allnds;
652 }
653
654 /* initialize list */
655 ISC_LIST_INIT(*dir_list);
656
4. Condition create_path(zone, NULL, NULL, cd, &basepath) != 0, taking true branch.
657 if (create_path(zone, NULL, NULL, cd, &basepath) != ISC_R_SUCCESS) {
CID 1441211 (#1 of 1): Resource leak (RESOURCE_LEAK)
5. leaked_storage: Variable dir_list going out of scope leaks the storage it points to.
658 return (ISC_R_NOTFOUND);
659 }
Edited by Mark Andrews