Avoid theoretical NULL pointer dereference
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 7 Sep 2009 12:04:01 +0000 (15:04 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 7 Sep 2009 12:04:01 +0000 (15:04 +0300)
- if sbp ends up not set it's an "internal error" really, dont bother
  with error message

build/parseBuildInstallClean.c

index 6f7421e..d81bd07 100644 (file)
@@ -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) {