qssb_append_syscalls_policy(): Fix mem leak on failure
This commit is contained in:
parent
db17e58deb
commit
1a2443db18
1
qssb.h
1
qssb.h
@ -796,6 +796,7 @@ int qssb_append_syscalls_policy(struct qssb_policy *qssb_policy, unsigned int sy
|
|||||||
int ret = qssb_append_syscall(&newpolicy->syscall, syscalls, n);
|
int ret = qssb_append_syscall(&newpolicy->syscall, syscalls, n);
|
||||||
if(ret != 0)
|
if(ret != 0)
|
||||||
{
|
{
|
||||||
|
free(newpolicy);
|
||||||
QSSB_LOG_ERROR("Failed to append syscall\n");
|
QSSB_LOG_ERROR("Failed to append syscall\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user