journal: don't allow journal_file_open() to be called with ret being NULL

This commit is contained in:
Lennart Poettering 2012-09-21 16:16:39 +02:00
parent 5d5e98eb8c
commit 0559d3a58a
1 changed files with 2 additions and 3 deletions

View File

@ -2012,6 +2012,7 @@ int journal_file_open(
bool newly_created = false;
assert(fname);
assert(ret);
if ((flags & O_ACCMODE) != O_RDONLY &&
(flags & O_ACCMODE) != O_RDWR)
@ -2156,9 +2157,7 @@ int journal_file_open(
if (r < 0)
goto fail;
if (ret)
*ret = f;
*ret = f;
return 0;
fail: