Merge "allow rpm to custom systemd installation" into tizen
[platform/upstream/rpm.git] / build / parsePolicies.c
index c66d82f..1295416 100644 (file)
@@ -64,15 +64,13 @@ int parsePolicies(rpmSpec spec)
        goto exit;
     }
 
-    pkg->policyList = newStringBuf();
-
     if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
        nextPart = PART_NONE;
     } else if (rc < 0) {
        goto exit;
     } else {
        while (!(nextPart = isPart(spec->line))) {
-           appendLineStringBuf(pkg->policyList, spec->line);
+           argvAdd(&(pkg->policyList), spec->line);
            if ((rc = readLine(spec, STRIP_TRAILINGSPACE | STRIP_COMMENTS)) > 0) {
                nextPart = PART_NONE;
                break;
@@ -84,8 +82,8 @@ int parsePolicies(rpmSpec spec)
     res = nextPart;
 
   exit:
-    argv = _free(argv);
-    optCon = poptFreeContext(optCon);
+    free(argv);
+    poptFreeContext(optCon);
 
     return res;
 }