qssb_append_syscalls_policy(): Fix mem leak on failure

This commit is contained in:
Albert S. 2021-11-09 10:02:56 +01:00
والد db17e58deb
کامیت 1a2443db18

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;
} }