teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame rpm-4.8.0-url-segfault.patch

Panu Matilainen bbc081
commit ce1d2e87157f4a7ebc4f4d6f26024ac597400367
Panu Matilainen bbc081
Author: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen bbc081
Date:   Thu Jan 21 13:45:34 2010 +0200
Panu Matilainen bbc081
Panu Matilainen bbc081
    Fix double-free segfault on url retrieve to read-only media (RhBug:557118)
Panu Matilainen bbc081
Panu Matilainen bbc081
diff --git a/lib/rpminstall.c b/lib/rpminstall.c
Panu Matilainen bbc081
index 6b3dde7..568e13f 100644
Panu Matilainen bbc081
--- a/lib/rpminstall.c
Panu Matilainen bbc081
+++ b/lib/rpminstall.c
Panu Matilainen bbc081
@@ -458,7 +458,7 @@ restart:
Panu Matilainen bbc081
 	case URL_IS_HTTPS:
Panu Matilainen bbc081
 	case URL_IS_HTTP:
Panu Matilainen bbc081
 	case URL_IS_FTP:
Panu Matilainen bbc081
-	{   char *tfn;
Panu Matilainen bbc081
+	{   char *tfn = NULL;
Panu Matilainen bbc081
 	    FD_t tfd;
Panu Matilainen bbc081
 
Panu Matilainen bbc081
 	    if (rpmIsVerbose())