Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> --- libsepol/src/expand.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libsepol/src/expand.c b/libsepol/src/expand.c index 2ff06cd7..5c20b806 100644 --- a/libsepol/src/expand.c +++ b/libsepol/src/expand.c @@ -2954,6 +2954,10 @@ int expand_module(sepol_handle_t * handle, state.out->policyvers = POLICYDB_VERSION_MAX; if (state.base->name) { state.out->name = strdup(state.base->name); + if (!state.out->name) { + ERR(handle, "Out of memory!"); + goto cleanup; + } } /* Copy mls state from base to out */ -- 2.40.1