summaryrefslogtreecommitdiff
path: root/trust/persist.c
diff options
context:
space:
mode:
Diffstat (limited to 'trust/persist.c')
-rw-r--r--trust/persist.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/trust/persist.c b/trust/persist.c
index 887b316..569cea1 100644
--- a/trust/persist.c
+++ b/trust/persist.c
@@ -89,7 +89,10 @@ p11_persist_new (void)
return_val_if_fail (persist != NULL, NULL);
persist->constants = p11_constant_reverse (true);
- return_val_if_fail (persist->constants != NULL, NULL);
+ if (persist->constants == NULL) {
+ free (persist);
+ return_val_if_reached (NULL);
+ }
return persist;
}