cls_rgw_client.cc: fix potential null pointer deref

Fix for:

CID 1054853 (#1 of 1): Dereference before null check (REVERSE_INULL)
 check_after_deref: Null-checking is_truncated suggests that it may
 be null, but it has already been dereferenced on all paths leading
 to the check.

Add vim line to file.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
Danny Al-Gaaf 2014-10-26 18:28:50 +01:00 committed by Sage Weil
parent 56de4caf35
commit 1bd2abec33

View File

@ -1,3 +1,5 @@
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
// vim: ts=8 sw=2 smarttab
#include <errno.h>
#include "include/types.h"
@ -251,7 +253,8 @@ int cls_rgw_usage_log_read(IoCtx& io_ctx, string& oid, string& user,
string& read_iter, map<rgw_user_bucket, rgw_usage_log_entry>& usage,
bool *is_truncated)
{
*is_truncated = false;
if (is_truncated)
*is_truncated = false;
bufferlist in, out;
rgw_cls_usage_log_read_op call;