File fortune-fixfree.patch of Package fortune

Index: fortune/fortune/fortune.c
===================================================================
--- fortune.orig/fortune/fortune.c
+++ fortune/fortune/fortune.c
@@ -544,11 +544,11 @@ over:
 			fprintf(stderr,
 				"fortune:%s not a fortune file or directory\n",
 				path);
-		free((char *) fp);
 		if (was_malloc)
 			free(path);
 		do_free(fp->datfile);
 		do_free(fp->posfile);
+		free((char *) fp);
 		do_free(offensive);
 		return FALSE;
 	}
openSUSE Build Service is sponsored by