From: Changgyu Choi Date: Tue, 20 Jun 2023 04:24:48 +0000 (+0900) Subject: Fix a static analysis issue X-Git-Tag: accepted/tizen/unified/20230623.160708~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d737a3f43c9b286e5a35c27ee017ba3549cfd3f8;p=platform%2Fcore%2Fappfw%2Faul-1.git Fix a static analysis issue Changes: - Adds checking whether root is nullptr or not. Change-Id: I694e8f0f696e9c4d4097adc876e7f868988458c8 Signed-off-by: Changgyu Choi --- diff --git a/src/aul_rsc_mgr_internal.c b/src/aul_rsc_mgr_internal.c index 24562a7..96f6fdd 100644 --- a/src/aul_rsc_mgr_internal.c +++ b/src/aul_rsc_mgr_internal.c @@ -233,6 +233,10 @@ int _resource_open(const char *path, resource_data_t **data) if (doc == NULL) return -1; root = xmlDocGetRootElement(doc); + if (!root) { + xmlFreeDoc(doc); + return -1; + } ret = __parse_resource(root, data);