From: Igor Pylypiv Date: Mon, 10 Jun 2019 20:52:35 +0000 (-0700) Subject: Fix possible NULL pointer dereference (#433) X-Git-Tag: v3.7.5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7c5056beda5483fcd5c098165fffd9be86fe98d;p=thirdparty%2Fccache.git Fix possible NULL pointer dereference (#433) cppcheck: [src/manifest.c:270] -> [src/manifest.c:269]: (warning) Either the condition '!errmsg' is redundant or there is possible null pointer dereference: errmsg. (cherry picked from commit 359be01b408ba4c60b968575ee6382ec5483f69f) --- diff --git a/src/manifest.c b/src/manifest.c index 0b85e9068..603d85bbd 100644 --- a/src/manifest.c +++ b/src/manifest.c @@ -288,7 +288,7 @@ read_manifest(gzFile f, char **errmsg) return mf; error: - if (!errmsg) { + if (!*errmsg) { *errmsg = x_strdup("Corrupt manifest file"); } free_manifest(mf);