michal-grzedzicki / rpms / rpm

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