teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.4.2-contextverify.patch

Paul Nasrat 6c603b
diff -u rpm-4.4.2/lib/verify.c rpm-4.4.2/lib/verify.c
Paul Nasrat 6c603b
--- rpm-4.4.2/lib/verify.c	2005-07-21 16:47:11.000000000 -0400
Paul Nasrat 6c603b
+++ rpm-4.4.2/lib/verify.c	2005-08-26 12:23:35.000000000 -0400
Paul Nasrat 6c603b
@@ -138,8 +138,10 @@
Paul Nasrat 6c603b
 
Paul Nasrat 6c603b
 	    if (fcontext == NULL || strcmp(fcontext, con))
Paul Nasrat 6c603b
 		*res |= RPMVERIFY_CONTEXTS;
Paul Nasrat 6c603b
-	    freecon(con);
Paul Nasrat 6c603b
-            freecon(fcontext); 
Paul Nasrat 6c603b
+            if (con != NULL)
Paul Nasrat 6c603b
+	        freecon(con);
Paul Nasrat 6c603b
+            if (fcontext != NULL)
Paul Nasrat 6c603b
+                freecon(fcontext); 
Paul Nasrat 6c603b
 
Paul Nasrat 6c603b
 	}
Paul Nasrat 6c603b
     }