Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libpromises/bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,14 @@ bool WriteAmPolicyHubFile(bool am_policy_hub)
{
if (!GetAmPolicyHub())
{
if (creat(filename, 0600) == -1)
int fd = creat(filename, 0600);
if (fd == -1)
{
Log(LOG_LEVEL_ERR, "Error writing marker file '%s'", filename);
free(filename);
return false;
}
close(fd);
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/testall
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ DIFF=${DIFF:-} ; export DIFF
LIBTOOL=${LIBTOOL:-} ; export LIBTOOL
INCLUDE_IN_WORKDIR=${INCLUDE_IN_WORKDIR:-} ; export INCLUDE_IN_WORKDIR

VALGRIND_OPTS="${VALGRIND_OPTS:---leak-check=full --show-reachable=yes --suppressions=valgrind-suppressions}"
VALGRIND_OPTS="${VALGRIND_OPTS:---leak-check=full --show-reachable=yes --suppressions=valgrind-suppressions --track-fds=yes}"
export VALGRIND_OPTS

export MAKEFLAGS
Expand Down
2 changes: 1 addition & 1 deletion tests/valgrind-check/valgrind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ make install

/var/cfengine/bin/cf-agent --version

VG_OPTS="--leak-check=full --track-origins=yes --error-exitcode=1"
VG_OPTS="--leak-check=full --track-origins=yes --error-exitcode=1 --track-fds=yes"
BOOTSTRAP_IP="127.0.0.1"

valgrind $VG_OPTS /var/cfengine/bin/cf-key 2>&1 | tee cf-key.txt
Expand Down
Loading