From cf9467daddb316b25de8b632fc0dca46c627aad6 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Fri, 24 Feb 2017 00:14:03 +1300 Subject: [PATCH] Add missing return statements after self_destruct() Detected by Coverity Scan. Issue 1364716. --- src/store/Disk.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/store/Disk.cc b/src/store/Disk.cc index dbdcaa5c2a..6a0af3f1da 100644 --- a/src/store/Disk.cc +++ b/src/store/Disk.cc @@ -282,8 +282,10 @@ Store::Disk::parseOptions(int isaReconfig) debugs(3,2, "cache_dir " << name << '=' << (value ? value : "")); if (newOption) - if (!newOption->parse(name, value, isaReconfig)) + if (!newOption->parse(name, value, isaReconfig)) { self_destruct(); + return; + } } delete newOption; @@ -352,8 +354,10 @@ Store::Disk::optionObjectSizeParse(char const *option, const char *value, int is } else return false; - if (!value) + if (!value) { self_destruct(); + return false; + } int64_t size = strtoll(value, NULL, 10); -- 2.47.2