Panu Matilainen 9c6110
commit 65eec62cb7796dad6fbf1d5436251e176449f522
Panu Matilainen 9c6110
Author: Panu Matilainen <pmatilai@redhat.com>
Panu Matilainen 9c6110
Date:   Thu Aug 29 16:32:32 2013 +0300
Panu Matilainen 9c6110
Panu Matilainen 9c6110
    Fix double-free on %caps() wildcard %files entry (RhBug:956190)
Panu Matilainen 9c6110
Panu Matilainen 9c6110
diff --git a/build/files.c b/build/files.c
Panu Matilainen 9c6110
index 20f452f..eed5696 100644
Panu Matilainen 9c6110
--- a/build/files.c
Panu Matilainen 9c6110
+++ b/build/files.c
Panu Matilainen 9c6110
@@ -1448,7 +1448,7 @@ static rpmRC addFile(FileList fl, const char * diskPath,
Panu Matilainen 9c6110
 	}
Panu Matilainen 9c6110
 
Panu Matilainen 9c6110
 	if (fl->cur.caps) {
Panu Matilainen 9c6110
-	    flp->caps = fl->cur.caps;
Panu Matilainen 9c6110
+	    flp->caps = xstrdup(fl->cur.caps);
Panu Matilainen 9c6110
 	} else {
Panu Matilainen 9c6110
 	    flp->caps = xstrdup("");
Panu Matilainen 9c6110
 	}