aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/permchain.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/permchain.c b/src/permchain.c
index b95bd8b..ad32f9d 100644
--- a/src/permchain.c
+++ b/src/permchain.c
@@ -67,6 +67,8 @@ static int add_chmod_rule_to_permchain(const char *start, const char *end,
int len = end - start;
char *buf = malloc((len + 1) * sizeof(char));
+ if (buf == NULL)
+ return -1;
const char *p = buf;
enum {LHS, RHS} state = LHS;