summaryrefslogtreecommitdiff
path: root/p11-kit/uri.c
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-03-20 22:20:25 +0100
committerStef Walter <stefw@gnome.org>2013-03-20 22:22:30 +0100
commit4b09d2b4d3958b58b020c1ae21fcd932e1eb6c37 (patch)
treeabba9eb25d2d7d4c9804ba56741e08e40b0fe417 /p11-kit/uri.c
parent57d8f36a6cfbde5a9a783f11f2b75f19005c23e1 (diff)
Fix memory leaks reported by 'make leakcheck'
Diffstat (limited to 'p11-kit/uri.c')
-rw-r--r--p11-kit/uri.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/p11-kit/uri.c b/p11-kit/uri.c
index 0bb35db..52bd61d 100644
--- a/p11-kit/uri.c
+++ b/p11-kit/uri.c
@@ -922,10 +922,7 @@ parse_class_attribute (const char *name, const char *start, const char *end,
free (value);
- attr.pValue = malloc (sizeof (klass));
- return_val_if_fail (attr.pValue != NULL, P11_KIT_URI_UNEXPECTED);
-
- memcpy (attr.pValue, &klass, sizeof (klass));
+ attr.pValue = &klass;
attr.ulValueLen = sizeof (klass);
attr.type = CKA_CLASS;