michal-grzedzicki / rpms / rpm

Forked from rpms/rpm 5 months ago
Clone
Blob Blame History Raw
commit 65eec62cb7796dad6fbf1d5436251e176449f522
Author: Panu Matilainen <pmatilai@redhat.com>
Date:   Thu Aug 29 16:32:32 2013 +0300

    Fix double-free on %caps() wildcard %files entry (RhBug:956190)

diff --git a/build/files.c b/build/files.c
index 20f452f..eed5696 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1448,7 +1448,7 @@ static rpmRC addFile(FileList fl, const char * diskPath,
 	}
 
 	if (fl->cur.caps) {
-	    flp->caps = fl->cur.caps;
+	    flp->caps = xstrdup(fl->cur.caps);
 	} else {
 	    flp->caps = xstrdup("");
 	}