未验证 提交 37d2088d 编写于 作者: Z zdenop 提交者: GitHub

Merge pull request #1533 from stweil/cov

Fix some issues reported by Coverity Scan
......@@ -210,11 +210,13 @@ ELIST_LINK *ELIST_ITERATOR::forward() {
cycle_pt = next;
current = next;
}
#ifndef NDEBUG
if (!current)
NULL_DATA.error ("ELIST_ITERATOR::forward", ABORT, nullptr);
#endif
next = current->next;
#ifndef NDEBUG
if (!current)
NULL_DATA.error ("ELIST_ITERATOR::forward", ABORT, nullptr);
if (!next)
NULL_NEXT.error ("ELIST_ITERATOR::forward", ABORT,
"This is: %p Current is: %p", this, current);
......
......@@ -90,7 +90,8 @@ Pix* CairoARGB32ToPixFormat(cairo_surface_t *surface) {
StringRenderer::StringRenderer(const std::string& font_desc, int page_width,
int page_height)
: page_width_(page_width),
: font_(font_desc),
page_width_(page_width),
page_height_(page_height),
h_margin_(50),
v_margin_(50),
......@@ -118,7 +119,6 @@ StringRenderer::StringRenderer(const std::string& font_desc, int page_width,
total_chars_(0),
font_index_(0),
last_offset_(0) {
set_font(font_desc);
set_resolution(kDefaultOutputResolution);
}
......
......@@ -279,6 +279,8 @@ void SVNetwork::Close() {
#else
close(stream_);
#endif
// Mark stream_ as invalid.
stream_ = -1;
}
......@@ -448,6 +450,7 @@ SVNetwork::SVNetwork(const char* hostname, int port) {
}
SVNetwork::~SVNetwork() {
Close();
delete[] msg_buffer_in_;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册