diff options
Diffstat (limited to 'src/fseccomp')
-rw-r--r-- | src/fseccomp/syscall.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fseccomp/syscall.c b/src/fseccomp/syscall.c index 3f5fbbbfa..7ea1e749d 100644 --- a/src/fseccomp/syscall.c +++ b/src/fseccomp/syscall.c | |||
@@ -546,7 +546,7 @@ static void syscall_in_list(int fd, int syscall, int arg, void *ptrarg) { | |||
546 | } | 546 | } |
547 | else { // no problem, add to pre-exec list | 547 | else { // no problem, add to pre-exec list |
548 | // build syscall:error_no | 548 | // build syscall:error_no |
549 | char *newcall; | 549 | char *newcall = NULL; |
550 | if (arg != 0) { | 550 | if (arg != 0) { |
551 | if (asprintf(&newcall, "%s:%s", syscall_find_nr(syscall), errno_find_nr(arg)) == -1) | 551 | if (asprintf(&newcall, "%s:%s", syscall_find_nr(syscall), errno_find_nr(arg)) == -1) |
552 | errExit("asprintf"); | 552 | errExit("asprintf"); |
@@ -560,6 +560,7 @@ static void syscall_in_list(int fd, int syscall, int arg, void *ptrarg) { | |||
560 | if (ptr->prelist) { | 560 | if (ptr->prelist) { |
561 | if (asprintf(&ptr->prelist, "%s,%s", ptr->prelist, newcall) == -1) | 561 | if (asprintf(&ptr->prelist, "%s,%s", ptr->prelist, newcall) == -1) |
562 | errExit("asprintf"); | 562 | errExit("asprintf"); |
563 | free(newcall); | ||
563 | } | 564 | } |
564 | else | 565 | else |
565 | ptr->prelist = newcall; | 566 | ptr->prelist = newcall; |