]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/encode.c
Merge changes from CUPS 1.4svn-r8196 (CUPS 1.4b2)
[thirdparty/cups.git] / cups / encode.c
index 19e6aa4e062f34fbcd78d8af8002e258048d5827..7d9198ea7e2e32b310de645bb4b4fd7a7915271e 100644 (file)
@@ -354,7 +354,7 @@ cupsEncodeOptions2(
     * Copy the name over...
     */
 
-    attr->name = _cupsStrRetain(option->name);
+    attr->name = _cupsStrAlloc(option->name);
 
     if (count > 1)
     {
@@ -535,9 +535,7 @@ cupsEncodeOptions2(
             break;
 
        default :
-           if (count == 1)
-             attr->values[0].string.text = _cupsStrRetain(val);
-           else if ((attr->values[j].string.text = _cupsStrAlloc(val)) == NULL)
+           if ((attr->values[j].string.text = _cupsStrAlloc(val)) == NULL)
            {
             /*
              * Ran out of memory!