selinux/semodule-utils/semodule_link
Christian Göttsche 8547846ecd semodule_link: avoid NULL dereference on OOM
In case the initial calloc(3) call fails the variable mods is still NULL
while its size hint num_mods is set.

Reported by Clang Analyzer:

    semodule_link.c:182:29: warning: Array access (from variable 'mods') results in a null pointer dereference [core.NullDereference]
      182 |                 sepol_module_package_free(mods[i]);
          |                                           ^~~~~~~

Fixes: 63e798a203 ("semodule_link: update")

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Acked-by: James Carter <jwcart2@gmail.com>
2023-11-15 08:38:39 -05:00
..
Makefile Do not automatically install Russian translations 2023-08-16 13:33:47 -04:00
semodule_link.8
semodule_link.c semodule_link: avoid NULL dereference on OOM 2023-11-15 08:38:39 -05:00