diff options
-rw-r--r-- | src/firejail/landlock.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/firejail/landlock.c b/src/firejail/landlock.c index 64d10b914..163804053 100644 --- a/src/firejail/landlock.c +++ b/src/firejail/landlock.c | |||
@@ -342,16 +342,15 @@ void ll_add_profile(int type, const char *data) { | |||
342 | if (!ll_is_supported()) | 342 | if (!ll_is_supported()) |
343 | return; | 343 | return; |
344 | 344 | ||
345 | const char *str = data; | 345 | while (*data == ' ' || *data == '\t') |
346 | while (*str == ' ' || *str == '\t') | 346 | data++; |
347 | str++; | ||
348 | 347 | ||
349 | LandlockEntry *ptr = malloc(sizeof(LandlockEntry)); | 348 | LandlockEntry *ptr = malloc(sizeof(LandlockEntry)); |
350 | if (!ptr) | 349 | if (!ptr) |
351 | errExit("malloc"); | 350 | errExit("malloc"); |
352 | memset(ptr, 0, sizeof(LandlockEntry)); | 351 | memset(ptr, 0, sizeof(LandlockEntry)); |
353 | ptr->type = type; | 352 | ptr->type = type; |
354 | ptr->data = strdup(str); | 353 | ptr->data = strdup(data); |
355 | if (!ptr->data) | 354 | if (!ptr->data) |
356 | errExit("strdup"); | 355 | errExit("strdup"); |
357 | ptr->next = cfg.lprofile; | 356 | ptr->next = cfg.lprofile; |