malloc failure is not handled
Ref code: https://github.com/OpenSCAP/openscap/blob/maint-1.3/src/OVAL/probes/independent/textfilecontent_probe.c#L164
There are dozens of calls to malloc that are not checked that it's scary in a "security scanner" tool.
Patches are welcome.
Keep in mind, though, that textfilecontent test is deprecated and has been replaced with textfilecontent54 like a decade ago.
Where is was completed? There are still unchecked calls to malloc.
If for some reason in a contemporary Linux you can't "allocate" memory (allocator returns NULL) for the name of a file you're pretty much screwed anyways. Also, the probe is deprecated.
I'll happily review the PR, tho.