]> granicus.if.org Git - p11-kit/commitdiff
iter: Fix return value in rare memory allocation case
authorStef Walter <stef@thewalter.net>
Mon, 13 Jan 2014 17:07:29 +0000 (18:07 +0100)
committerStef Walter <stef@thewalter.net>
Mon, 13 Jan 2014 17:11:04 +0000 (18:11 +0100)
p11-kit/iter.c

index b6861a5a31b8b9895482d4dc7cac1445ae4e873f..5301162b3c541abcdd9c07222c541c2ed7f4a85f 100644 (file)
@@ -860,7 +860,7 @@ p11_kit_iter_load_attributes (P11KitIter *iter,
 
                } else {
                        template[i].pValue = realloc (original[i].pValue, template[i].ulValueLen);
-                       return_val_if_fail (template[i].pValue != NULL, 0);
+                       return_val_if_fail (template[i].pValue != NULL, CKR_HOST_MEMORY);
                }
        }