Skip to content

Commit

Permalink
lib: fix mem-leak in messages' DispatchMessage()
Browse files Browse the repository at this point in the history
  • Loading branch information
arogge committed Feb 24, 2022
1 parent 7b9f072 commit 1c83b9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/src/lib/message.cc
Expand Up @@ -819,6 +819,7 @@ void DispatchMessage(JobControlRecord* jcr,
break;
}
d->mail_filename_ = name;
FreePoolMemory(name);
}
fputs(dt, d->file_pointer_);
len = strlen(msg) + dtlen;
Expand Down
2 changes: 1 addition & 1 deletion systemtests/tests/messages/testrunner
Expand Up @@ -38,7 +38,7 @@ rm -f "$mail_file"
rm -f "$operator_file"

function exit_error() {
[ "$1" == "" ] || echo "$1"
[ "${1:-}" == "" ] || echo "$1"
estat=1
end_test
exit 1
Expand Down

0 comments on commit 1c83b9a

Please sign in to comment.