From 2bdd1a5f5c4b23612a7d87992597b1cd39db86c5 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 7 Sep 2009 15:04:01 +0300 Subject: [PATCH] Avoid theoretical NULL pointer dereference - if sbp ends up not set it's an "internal error" really, dont bother with error message --- build/parseBuildInstallClean.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/parseBuildInstallClean.c b/build/parseBuildInstallClean.c index 6f7421e..d81bd07 100644 --- a/build/parseBuildInstallClean.c +++ b/build/parseBuildInstallClean.c @@ -27,6 +27,8 @@ int parseBuildInstallClean(rpmSpec spec, rpmParseState parsePart) } else if (parsePart == PART_CLEAN) { sbp = &(spec->clean); name = "%clean"; + } else { + goto exit; /* programmer error */ } if (*sbp != NULL) { -- 2.7.4