From 359be01b408ba4c60b968575ee6382ec5483f69f Mon Sep 17 00:00:00 2001 From: Igor Pylypiv Date: Mon, 10 Jun 2019 13:52:35 -0700 Subject: [PATCH] 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. --- src/manifest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manifest.c b/src/manifest.c index 00da5424e..6de842d2c 100644 --- a/src/manifest.c +++ b/src/manifest.c @@ -266,7 +266,7 @@ read_manifest(gzFile f, char **errmsg) return mf; error: - if (!errmsg) { + if (!*errmsg) { *errmsg = x_strdup("Corrupt manifest file"); } free_manifest(mf); -- 2.47.2