[PATCH 15/30] Function pull_state cannot work with NULL buffer
Zdenek Kabelac <[email protected]>
| Newsgroups | dev.linux.lists.lvm-devel |
|---|---|
| Message-ID | <abdcbbaa1bdc75655773af22a50db6ff0e1e8539.1287994530.git.zkabelac@redhat.com> |
In practice this situation should not happen in current lvm code. Signed-off-by: Zdenek Kabelac <[email protected]> --- daemons/cmirrord/functions.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c index e5da757..58e76ac 100644 --- a/daemons/cmirrord/functions.c +++ b/daemons/cmirrord/functions.c @@ -1809,8 +1809,10 @@ int pull_state(const char *uuid, uint64_t luid, int bitset_size; struct log_c *lc; - if (!buf) + if (!buf) { LOG_ERROR("pull_state: buf == NULL"); + return -EINVAL; + } lc = get_log(uuid, luid); if (!lc) { -- 1.7.3.1