Blame SOURCES/libpaper-covscan.patch

2072e9
diff --git a/lib/paper.c b/lib/paper.c
2072e9
index 57db599..8817aea 100644
2072e9
--- a/lib/paper.c
2072e9
+++ b/lib/paper.c
2072e9
@@ -211,7 +211,10 @@ PAPERSIZEVAR, fall-back to the old behaviour.
2072e9
 		fclose(ps);
2072e9
 
2072e9
 		paperstr = malloc((strlen(papername) + 1) * sizeof(char));
2072e9
-		if (! paperstr) return 0;
2072e9
+		if (! paperstr) {
2072e9
+		    free(papername);
2072e9
+		    return 0;
2072e9
+		}
2072e9
 
2072e9
 		strcpy(paperstr, papername);
2072e9
 		free(papername);