Skip to content

Commit

Permalink
Fix deallocator in error handler
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Fuchs <[email protected]>
  • Loading branch information
Andreas Fuchs committed Apr 17, 2020
1 parent b2f4817 commit da334f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tpm2-tss-engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ loadkey(ENGINE *e, const char *key_id, UI_METHOD *ui, void *cb_data)

return pkey;
error:
free(tpm2Data);
if (tpm2Data)
OPENSSL_free(tpm2Data);
return NULL;
}

Expand Down

0 comments on commit da334f8

Please sign in to comment.