Merge 4.14.72 into android-4.14-p
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / security / security.c
index 264a5e5a0595eda46e846ce1430b79f43eec008f..cb73a90c50d5b769748e17ca94e8b475091d0493 100644 (file)
@@ -112,6 +112,8 @@ static int lsm_append(char *new, char **result)
 
        if (*result == NULL) {
                *result = kstrdup(new, GFP_KERNEL);
+               if (*result == NULL)
+                       return -ENOMEM;
        } else {
                /* Check if it is the last registered name */
                if (match_last_lsm(*result, new))