mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
replaced strdup with tor_strdup
This commit is contained in:
parent
2a6c34750d
commit
839ff0063d
@ -784,7 +784,7 @@ sandbox_cfg_allow_stat64_filename(sandbox_cfg_t **cfg, char *file, int fr)
|
|||||||
{
|
{
|
||||||
sandbox_cfg_t *elem = NULL;
|
sandbox_cfg_t *elem = NULL;
|
||||||
|
|
||||||
elem = new_element(SCMP_SYS(stat64), 0, (intptr_t) strdup(file));
|
elem = new_element(SCMP_SYS(stat64), 0, (intptr_t) tor_strdup(file));
|
||||||
if (!elem) {
|
if (!elem) {
|
||||||
log_err(LD_BUG,"(Sandbox) failed to register parameter!");
|
log_err(LD_BUG,"(Sandbox) failed to register parameter!");
|
||||||
return -1;
|
return -1;
|
||||||
@ -827,7 +827,7 @@ sandbox_cfg_allow_open_filename(sandbox_cfg_t **cfg, char *file, int fr)
|
|||||||
{
|
{
|
||||||
sandbox_cfg_t *elem = NULL;
|
sandbox_cfg_t *elem = NULL;
|
||||||
|
|
||||||
elem = new_element(SCMP_SYS(open), 0, (intptr_t) strdup(file));
|
elem = new_element(SCMP_SYS(open), 0, (intptr_t) tor_strdup(file));
|
||||||
if (!elem) {
|
if (!elem) {
|
||||||
log_err(LD_BUG,"(Sandbox) failed to register parameter!");
|
log_err(LD_BUG,"(Sandbox) failed to register parameter!");
|
||||||
return -1;
|
return -1;
|
||||||
@ -870,7 +870,7 @@ sandbox_cfg_allow_openat_filename(sandbox_cfg_t **cfg, char *file, int fr)
|
|||||||
{
|
{
|
||||||
sandbox_cfg_t *elem = NULL;
|
sandbox_cfg_t *elem = NULL;
|
||||||
|
|
||||||
elem = new_element(SCMP_SYS(openat), 1, (intptr_t) strdup(file));
|
elem = new_element(SCMP_SYS(openat), 1, (intptr_t) tor_strdup(file));
|
||||||
if (!elem) {
|
if (!elem) {
|
||||||
log_err(LD_BUG,"(Sandbox) failed to register parameter!");
|
log_err(LD_BUG,"(Sandbox) failed to register parameter!");
|
||||||
return -1;
|
return -1;
|
||||||
@ -913,7 +913,7 @@ sandbox_cfg_allow_execve(sandbox_cfg_t **cfg, char *com)
|
|||||||
{
|
{
|
||||||
sandbox_cfg_t *elem = NULL;
|
sandbox_cfg_t *elem = NULL;
|
||||||
|
|
||||||
elem = new_element(SCMP_SYS(execve), 1, (intptr_t) strdup(com));
|
elem = new_element(SCMP_SYS(execve), 1, (intptr_t) tor_strdup(com));
|
||||||
if (!elem) {
|
if (!elem) {
|
||||||
log_err(LD_BUG,"(Sandbox) failed to register parameter!");
|
log_err(LD_BUG,"(Sandbox) failed to register parameter!");
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user