diff options
author | Daiki Ueno <dueno@redhat.com> | 2018-10-16 18:10:05 +0200 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2018-10-17 10:13:32 +0200 |
commit | b10dadce5a3c921149b2c9fe0dec614f8076ebda (patch) | |
tree | 1be6432a3cd602032c4c036bcfac4fea1b1f7158 /trust/persist.c | |
parent | c76197ddbbd0c29adc2bceff2ee9f740f71d134d (diff) |
build: Free memory before return{,_val}_if_* macros
Diffstat (limited to 'trust/persist.c')
-rw-r--r-- | trust/persist.c | 5 |
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; } |