From dbffd55b3c6bdabfb286963311a09008016898d3 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 15 2020 18:49:53 +0000 Subject: Apply patch openscap-1.3.4-bump-yamlfilter-fix-warnings-PR_1530.patch patch_name: openscap-1.3.4-bump-yamlfilter-fix-warnings-PR_1530.patch present_in_specfile: true --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ebb8c6e..0de25d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -545,7 +545,7 @@ include_directories( "src/XCCDF/public/" "src/XCCDF_POLICY/" "src/XCCDF_POLICY/public/" - "yaml-filter" + "yaml-filter/src/" ${CMAKE_BINARY_DIR} # config.h is generated to build directory ${LIBXML2_INCLUDE_DIR} ${PCRE_INCLUDE_DIRS} @@ -570,7 +570,7 @@ function(set_oscap_generic_properties TARGET_OBJECT) endfunction() if(OPENSCAP_PROBE_INDEPENDENT_YAMLFILECONTENT) - add_library(yamlfilter_object OBJECT yaml-filter/yaml-path.c yaml-filter/yaml-path.h) + add_library(yamlfilter_object OBJECT yaml-filter/src/yaml-path.c yaml-filter/src/yaml-path.h) set_oscap_generic_properties(yamlfilter_object) endif() diff --git a/src/OVAL/probes/independent/yamlfilecontent_probe.c b/src/OVAL/probes/independent/yamlfilecontent_probe.c index 8fc4b32..b8a3793 100644 --- a/src/OVAL/probes/independent/yamlfilecontent_probe.c +++ b/src/OVAL/probes/independent/yamlfilecontent_probe.c @@ -159,6 +159,7 @@ static int yaml_path_query(const char *filepath, const char *yaml_path_cstr, str probe_cobj_add_msg(probe_ctx_getresult(ctx), msg); SEXP_free(msg); probe_cobj_set_flag(probe_ctx_getresult(ctx), SYSCHAR_FLAG_ERROR); + yaml_path_destroy(yaml_path); fclose(yaml_file); return -1; };